refactor(front-end): use state hook to enable and disable full display mode

main
Josue 4 years ago
parent 66c0e01b27
commit b536b317dc
  1. 6
      striker-ui/pages/server/[uuid].tsx

@ -43,7 +43,7 @@ const useStyles = makeStyles((theme) => ({
}));
const Server = (): JSX.Element => {
const [previewMode] = useState<boolean>(true);
const [previewMode, setPreviewMode] = useState<boolean>(true);
const classes = useStyles();
const router = useRouter();
@ -61,7 +61,7 @@ const Server = (): JSX.Element => {
(previewMode ? (
<Box className={classes.container}>
<Box className={classes.child}>
<Preview />
<Preview setMode={setPreviewMode} />
<CPU />
<Memory />
</Box>
@ -74,7 +74,7 @@ const Server = (): JSX.Element => {
</Box>
) : (
<Box className={classes.container}>
<FullSize />
<FullSize setMode={setPreviewMode} />
</Box>
))}
</>

Loading…
Cancel
Save