'use client'; import { useRef } from 'react'; import { SnackbarProvider as NotistackProvider, closeSnackbar } from 'notistack'; // @mui import Collapse from '@mui/material/Collapse'; import IconButton from '@mui/material/IconButton'; // import Iconify from '../iconify'; import { useSettingsContext } from '../settings'; // import { StyledIcon, StyledNotistack } from './styles'; // ---------------------------------------------------------------------- type Props = { children: React.ReactNode; }; export default function SnackbarProvider({ children }: Props) { const settings = useSettingsContext(); const isRTL = settings.themeDirection === 'rtl'; const notistackRef = useRef(null); return ( ), success: ( ), warning: ( ), error: ( ), }} Components={{ default: StyledNotistack, info: StyledNotistack, success: StyledNotistack, warning: StyledNotistack, error: StyledNotistack, }} // with close as default action={(snackbarId) => ( closeSnackbar(snackbarId)} sx={{ p: 0.5 }}> )} > {children} ); }