HOC to enable components(especially the Material UI Modals) to close when browser is navigated back/forward
import { withCloseOnNavigation } from "mui-extended"; import { Dialog } from "@mui/material"; const NavigationClasableDialog = withCloseOnNavigation(Dialog);
withCloseOnNavigation
accepts any component with open
and onClose
props
Layout component uses withCloseOnNavigation
for menu in Mobile mode
window.history
api.next/link
and next/router
Write an email to opensource@sodaru.com