add SWRConfig

This commit is contained in:
AmirHossein Mahmoodi
2025-05-13 09:10:41 +03:30
parent 17fa016bd9
commit 684f35d648

View File

@@ -1,13 +1,16 @@
import HeaderWithLogo from "@/components/layouts/dashboard/headerWithLogo";
import HeaderWithSidebar from "@/components/layouts/dashboard/headerWithSidebar";
import { Stack } from "@mui/material";
import { SWRConfig } from "swr";
const Layout = ({ children }) => {
return (
<Stack sx={{ width: "100%", height: "100%" }}>
<HeaderWithLogo />
<HeaderWithSidebar>{children}</HeaderWithSidebar>
</Stack>
<SWRConfig value={{ provider: () => new Map() }}>
<Stack sx={{ width: "100%", height: "100%" }}>
<HeaderWithLogo />
<HeaderWithSidebar>{children}</HeaderWithSidebar>
</Stack>
</SWRConfig>
);
};
export default Layout;