такое фикситься?
export const Header = () => {
const classes = useStyles();
const dispatch = useDispatch();
const {
isOpen,
message,
success,
}:ISnack = useSelector((state: IRootTypes)=> state.auxiliaryReducer.snackBarStatus);
const isLoading: boolean = useSelector((state: IRootTypes) => state.auxiliaryReducer.isLoading);
const onClosedHandler = useCallback(() => {
dispatch(setSnackBarStatus(false, '', false));
}, [dispatch]);
return (
<div className={classes.root}>
<AppBar position="static">
<Toolbar className={classes.toolbar}>
<Drawer />
</Toolbar>
</AppBar>
<ProgressBar isLoading={isLoading} />
<AlertSnackbar
isOpen={isOpen}
message={message}
success={success}
onClose={onClosedHandler}
/>
</div>
);
};
гуглится и фиксится
Обсуждают сегодня