import React, { ComponentPropsWithoutRef, useMemo } from 'react';
import { Provider, Viewport } from '@radix-ui/react-toast';
import { SimpleToast, SimpleToastProps } from './SimpleToast';
import { useToast } from './useToast';
interface ToasterProps extends ComponentPropsWithoutRef<'div'> {}
export const Toaster = ({}: ToasterProps) => {
const { toasts } = useToast();
const renderToasts = useMemo(
() =>
toasts.map(({ id, ...props }) => (
)),
[toasts],
);
return (
{renderToasts}
);
};