style: auto format whole project

This commit is contained in:
Ali BARIN
2022-11-05 23:57:33 +01:00
parent e338770e57
commit 475f24f661
199 changed files with 2421 additions and 1839 deletions

View File

@@ -15,7 +15,7 @@ import Drawer from 'components/Drawer';
type PublicLayoutProps = {
children: React.ReactNode;
}
};
const drawerLinks = [
{
@@ -45,12 +45,16 @@ const generateDrawerBottomLinks = ({ notificationBadgeContent = 0 }) => [
to: URLS.UPDATES,
badgeContent: notificationBadgeContent,
},
]
];
export default function PublicLayout({ children }: PublicLayoutProps): React.ReactElement {
export default function PublicLayout({
children,
}: PublicLayoutProps): React.ReactElement {
const version = useVersion();
const theme = useTheme();
const matchSmallScreens = useMediaQuery(theme.breakpoints.down('lg'), { noSsr: true });
const matchSmallScreens = useMediaQuery(theme.breakpoints.down('lg'), {
noSsr: true,
});
const [isDrawerOpen, setDrawerOpen] = React.useState(!matchSmallScreens);
const openDrawer = () => setDrawerOpen(true);
@@ -62,9 +66,13 @@ export default function PublicLayout({ children }: PublicLayoutProps): React.Rea
return (
<>
<AppBar drawerOpen={isDrawerOpen} onDrawerOpen={openDrawer} onDrawerClose={closeDrawer} />
<AppBar
drawerOpen={isDrawerOpen}
onDrawerOpen={openDrawer}
onDrawerClose={closeDrawer}
/>
<Box sx={{ display: 'flex', }}>
<Box sx={{ display: 'flex' }}>
<Drawer
links={drawerLinks}
bottomLinks={drawerBottomLinks}
@@ -73,7 +81,7 @@ export default function PublicLayout({ children }: PublicLayoutProps): React.Rea
onClose={closeDrawer}
/>
<Box sx={{ flex: 1, }}>
<Box sx={{ flex: 1 }}>
<Toolbar />
{children}