Commit 58e3a2de by jaymehta

.

1 parent fc1b4ee3
...@@ -12,10 +12,10 @@ export const GenericLayout = ({ children }) => { ...@@ -12,10 +12,10 @@ export const GenericLayout = ({ children }) => {
const router = useRouter(); const router = useRouter();
const [isRoute, setIsRoute] = useState(""); const [isRoute, setIsRoute] = useState("");
useEffect(() => { useEffect(() => {
const adminUri = router.pathname.includes('admin'); const adminUri = router.pathname.includes("admin");
const vendorUri = router.pathname.includes('vendor'); const vendorUri = router.pathname.includes("vendor");
setIsRoute(adminUri ? 'admin' : vendorUri ? 'vendor' : ''); setIsRoute(adminUri ? "admin" : vendorUri ? "vendor" : "");
console.log('isRoute:', isRoute); console.log("isRoute:", isRoute);
}, [router.pathname]); }, [router.pathname]);
useEffect(() => { useEffect(() => {
dispatch(loadUser()); dispatch(loadUser());
...@@ -27,8 +27,8 @@ export const GenericLayout = ({ children }) => { ...@@ -27,8 +27,8 @@ export const GenericLayout = ({ children }) => {
return ( return (
<div <div
style={{ style={{
height: '100vh', height: "100vh",
width: '100vw' width: "100vw"
}} }}
> >
<GenericHeader <GenericHeader
...@@ -41,17 +41,21 @@ export const GenericLayout = ({ children }) => { ...@@ -41,17 +41,21 @@ export const GenericLayout = ({ children }) => {
<div <div
className="w-100 d-flex" className="w-100 d-flex"
style={{ style={{
height: 'calc(100vh - 80px)', height: "calc(100vh - 80px)"
}} }}
> >
<GenericSidebar isRoute={isRoute} /> <GenericSidebar isRoute={isRoute} />
<div style={{ <ToastContainer position="bottom-right" />
width: '85%',
overflowY: 'auto' <div
}}> style={{
width: "85%",
overflowY: "auto"
}}
>
{children} {children}
</div> </div>
</div> </div>
</div> </div>
)
}
\ No newline at end of file \ 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!