Commit 58e3a2de by jaymehta

.

1 parent fc1b4ee3
......@@ -12,10 +12,10 @@ export const GenericLayout = ({ children }) => {
const router = useRouter();
const [isRoute, setIsRoute] = useState("");
useEffect(() => {
const adminUri = router.pathname.includes('admin');
const vendorUri = router.pathname.includes('vendor');
setIsRoute(adminUri ? 'admin' : vendorUri ? 'vendor' : '');
console.log('isRoute:', isRoute);
const adminUri = router.pathname.includes("admin");
const vendorUri = router.pathname.includes("vendor");
setIsRoute(adminUri ? "admin" : vendorUri ? "vendor" : "");
console.log("isRoute:", isRoute);
}, [router.pathname]);
useEffect(() => {
dispatch(loadUser());
......@@ -27,8 +27,8 @@ export const GenericLayout = ({ children }) => {
return (
<div
style={{
height: '100vh',
width: '100vw'
height: "100vh",
width: "100vw"
}}
>
<GenericHeader
......@@ -41,17 +41,21 @@ export const GenericLayout = ({ children }) => {
<div
className="w-100 d-flex"
style={{
height: 'calc(100vh - 80px)',
height: "calc(100vh - 80px)"
}}
>
<GenericSidebar isRoute={isRoute} />
<div style={{
width: '85%',
overflowY: 'auto'
}}>
<ToastContainer position="bottom-right" />
<div
style={{
width: "85%",
overflowY: "auto"
}}
>
{children}
</div>
</div>
</div>
)
}
\ No newline at end of file
);
};
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!