fix(frontend): build errors and warnings

This commit is contained in:
Leandro Farias 2023-05-08 12:13:27 +00:00
parent a1ccd87b43
commit d682a46f69
8 changed files with 2395 additions and 949 deletions

View File

@ -4,6 +4,7 @@
"@next/next/no-img-element": "off", "@next/next/no-img-element": "off",
"jsx-a11y/alt-text": "off", "jsx-a11y/alt-text": "off",
"react/display-name": "off", "react/display-name": "off",
"react/no-unescaped-entities": 0,
"react/jsx-max-props-per-line": [ "react/jsx-max-props-per-line": [
1, 1,
{ {

File diff suppressed because it is too large Load Diff

View File

@ -39,7 +39,7 @@ export const AuthGuard = (props) => {
setChecked(true); setChecked(true);
} }
}, },
[router.isReady] [router.isReady, isAuthenticated, router]
); );
if (!checked) { if (!checked) {

View File

@ -67,7 +67,9 @@ export const SideNav = (props) => {
}} }}
> >
<div style={{display:'flex',justifyContent:'center'}}> <div style={{display:'flex',justifyContent:'center'}}>
<img src="/assets/oktopus.png" width={'60%'}></img> <img src="/assets/oktopus.png"
width={'60%'}
/>
</div> </div>
<SvgIcon <SvgIcon
fontSize="small" fontSize="small"

View File

@ -29,8 +29,12 @@ const Favicon = () => (
</> </>
); );
const Fonts = () => ( class CustomDocument extends Document {
<> render() {
return (
<Html lang="en">
<Head>
<Favicon />
<link <link
rel="preconnect" rel="preconnect"
href="https://fonts.googleapis.com" href="https://fonts.googleapis.com"
@ -51,16 +55,6 @@ const Fonts = () => (
rel="stylesheet" rel="stylesheet"
href="https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@600;700&display=swap" href="https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@600;700&display=swap"
/> />
</>
);
class CustomDocument extends Document {
render() {
return (
<Html lang="en">
<Head>
<Favicon />
<Fonts />
</Head> </Head>
<body> <body>
<Main /> <Main />

View File

@ -93,7 +93,11 @@ const handleOpen = () => {
</CardContent> </CardContent>
<Divider /> <Divider />
<CardActions sx={{ justifyContent: 'flex-end' }}> <CardActions sx={{ justifyContent: 'flex-end' }}>
<Button variant="contained" endIcon={<SvgIcon><PaperAirplane /></SvgIcon>} onClick={handleOpen}> <Button
variant="contained"
endIcon={<SvgIcon><PaperAirplane /></SvgIcon>}
onClick={handleOpen}
>
Send Send
</Button> </Button>
</CardActions> </CardActions>

View File

@ -80,7 +80,11 @@ export const OverviewLatestOrders = (props) => {
</SeverityPill> </SeverityPill>
</TableCell> </TableCell>
<TableCell> <TableCell>
<SvgIcon fontSize="small" sx={{cursor:'pointer'}} onClick={()=>router.push("devices/"+order.id)}> <SvgIcon
fontSize="small"
sx={{cursor:'pointer'}}
onClick={()=>router.push("devices/"+order.id)}
>
<ArrowTopRightOnSquareIcon /> <ArrowTopRightOnSquareIcon />
</SvgIcon> </SvgIcon>
</TableCell> </TableCell>

View File

@ -24,7 +24,11 @@ function MyApp() {
}} }}
> >
{theme.palette.mode} mode {theme.palette.mode} mode
<IconButton sx={{ ml: 1 }} onClick={colorMode.toggleColorMode} color="inherit"> <IconButton
sx={{ ml: 1 }}
onClick={colorMode.toggleColorMode}
color="inherit"
>
{theme.palette.mode === 'dark' ? <Brightness7Icon /> : <Brightness4Icon />} {theme.palette.mode === 'dark' ? <Brightness7Icon /> : <Brightness4Icon />}
</IconButton> </IconButton>
</Box> </Box>
@ -39,7 +43,7 @@ export default function ToggleColorMode() {
setMode((prevMode) => (prevMode === 'light' ? 'dark' : 'light')); setMode((prevMode) => (prevMode === 'light' ? 'dark' : 'light'));
}, },
}), }),
[], [setMode],
); );
const theme = React.useMemo( const theme = React.useMemo(