link-stack/apps/leafcutter/app/(main)/setup/_components/Setup.tsx

51 lines
1.2 KiB
TypeScript
Raw Normal View History

2023-06-28 10:52:23 +00:00
"use client";
import { FC } from "react";
2023-05-24 20:27:57 +00:00
import { useLayoutEffect } from "react";
2023-06-28 09:09:45 +00:00
import { useRouter } from "next/navigation";
2023-02-13 13:46:56 +00:00
import { Grid, CircularProgress } from "@mui/material";
import Iframe from "react-iframe";
2024-06-05 08:52:41 +02:00
import { useLeafcutterContext } from "@link-stack/leafcutter-ui/components/LeafcutterProvider";
2023-02-13 13:46:56 +00:00
2023-07-11 13:48:05 +00:00
export const Setup: FC = () => {
2023-02-13 13:46:56 +00:00
const {
colors: { leafcutterElectricBlue },
2024-03-20 17:51:21 +01:00
} = useLeafcutterContext();
2023-02-13 13:46:56 +00:00
const router = useRouter();
useLayoutEffect(() => {
2024-12-13 16:37:20 +01:00
setTimeout(() => router.push("/"), 2000);
2023-02-13 13:46:56 +00:00
}, [router]);
return (
<Grid
sx={{ width: "100%", height: 700 }}
direction="row"
2023-08-25 07:11:33 +00:00
container
2023-02-13 13:46:56 +00:00
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;