App directory #3

This commit is contained in:
Darren Clarke 2023-06-28 10:52:23 +00:00 committed by GitHub
parent 8bbeaa25cf
commit 69706053c6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
25 changed files with 69 additions and 40 deletions

View file

@ -0,0 +1,49 @@
"use client";
import { FC } from "react";
import { useLayoutEffect } from "react";
import { useRouter } from "next/navigation";
import { Grid, CircularProgress } from "@mui/material";
import Iframe from "react-iframe";
import { useAppContext } from "@/app/_components/AppProvider";
export const Setup:FC = () => {
const {
colors: { leafcutterElectricBlue },
} = useAppContext();
const router = useRouter();
useLayoutEffect(() => {
setTimeout(() => router.push("/"), 4000);
}, [router]);
return (
<Grid
sx={{ width: "100%", height: 700 }}
direction="row"
justifyContent="space-around"
alignItems="center"
alignContent="center"
>
<Grid
item
xs={12}
sx={{
width: "200px",
height: 700,
textAlign: "center",
margin: "0 auto",
pt: 30,
}}
>
<Iframe url="/app/home" height="1" width="1" frameBorder={0} />
<CircularProgress
size={80}
thickness={5}
sx={{ color: leafcutterElectricBlue }}
/>
</Grid>
</Grid>
);
};
export default Setup;

View file

@ -0,0 +1,6 @@
import { Setup } from './_components/Setup';
export default function Page() {
return <Setup />;
}