Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Jay Mehta
/
zango-frontend
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Registry
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit 58e3a2de
authored
2024-06-15 15:39:24 +0530
by
jaymehta
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
.
1 parent
fc1b4ee3
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
13 deletions
components/layout/Generics/GenericLayout.js
components/layout/Generics/GenericLayout.js
View file @
58e3a2d
...
...
@@ -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
);
};
Write
Preview
Styling with
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment