-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from rarimo/feature/layout
Layouts & router guards
- Loading branch information
Showing
17 changed files
with
208 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import { Divider, Stack } from '@mui/material' | ||
import { Link } from 'react-router-dom' | ||
|
||
import { config } from '@/config' | ||
import { Icons, Routes } from '@/enums' | ||
import { UiButton, UiIcon } from '@/ui' | ||
|
||
const AppNavbar = () => { | ||
return ( | ||
<Stack spacing={4} py={1}> | ||
<Link to={Routes.Profiles}> | ||
<Stack alignItems='center'> | ||
<img src='/branding/logo.svg' alt={config.APP_NAME} /> | ||
</Stack> | ||
</Link> | ||
<Divider /> | ||
<Stack py={6}> | ||
<Link to={Routes.Profiles}> | ||
<UiButton component='div' sx={{ p: 3 }}> | ||
<UiIcon name={Icons.Wallet} size={6} /> | ||
</UiButton> | ||
</Link> | ||
</Stack> | ||
</Stack> | ||
) | ||
} | ||
|
||
export default AppNavbar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import { Box, Stack } from '@mui/material' | ||
import { Outlet } from 'react-router-dom' | ||
|
||
import { config } from '@/config' | ||
|
||
const AuthLayout = () => { | ||
return ( | ||
<Stack | ||
alignItems='center' | ||
justifyContent='center' | ||
height='calc(100 * var(--vh, 1vh))' | ||
width='100%' | ||
sx={{ | ||
backgroundImage: 'url("/imgs/app-bg.png")', | ||
backgroundRepeat: 'no-repeat', | ||
backgroundSize: 'cover', | ||
}} | ||
> | ||
<Box position='absolute' top={25} left={25}> | ||
<img src='/branding/logo-sign-in.svg' alt={config.APP_NAME} /> | ||
</Box> | ||
|
||
<Stack direction='column' alignItems='center' justifyContent='center' width='100%'> | ||
<Outlet /> | ||
</Stack> | ||
</Stack> | ||
) | ||
} | ||
|
||
export default AuthLayout |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { Stack } from '@mui/material' | ||
import { Outlet } from 'react-router-dom' | ||
|
||
import AppNavbar from '@/components/AppNavbar' | ||
|
||
const MainLayout = () => { | ||
return ( | ||
<Stack direction='row' px={4} py={5} spacing={4} height='calc(100 * var(--vh, 1vh))'> | ||
<AppNavbar /> | ||
<Stack | ||
width='100%' | ||
borderRadius={4} | ||
px={8} | ||
py={6} | ||
sx={{ backgroundColor: 'background.paper' }} | ||
> | ||
<Outlet /> | ||
</Stack> | ||
</Stack> | ||
) | ||
} | ||
|
||
export default MainLayout |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.