Organize directories
This commit is contained in:
parent
8a91c9b89b
commit
4898382f78
433 changed files with 0 additions and 0 deletions
29
apps/metamigo-frontend/pages/index.tsx
Normal file
29
apps/metamigo-frontend/pages/index.tsx
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
import { NextPage } from "next";
|
||||
import { Typography, Box, Button, Grid, Link } from "@material-ui/core";
|
||||
import { FC, PropsWithChildren, useEffect } from "react";
|
||||
import { useRouter } from "next/router";
|
||||
|
||||
export const RedirectToAdmin: FC<PropsWithChildren> = ({ children }) => {
|
||||
const router = useRouter();
|
||||
useEffect(() => {
|
||||
router.push("/admin");
|
||||
});
|
||||
|
||||
return <>{children}</>;
|
||||
};
|
||||
|
||||
const Home: NextPage = () => (
|
||||
<Box>
|
||||
<Typography variant="h3">Metamigo</Typography>
|
||||
<Grid container justify="space-around" style={{ padding: 60 }}>
|
||||
<Grid item>
|
||||
<Link href="/admin">
|
||||
<Button variant="contained">Admin</Button>
|
||||
<RedirectToAdmin />
|
||||
</Link>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Box>
|
||||
);
|
||||
|
||||
export default Home;
|
||||
Loading…
Add table
Add a link
Reference in a new issue