Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
KelvinTegelaar committed Sep 24, 2024
1 parent 6fdc7d5 commit f64a31c
Showing 1 changed file with 48 additions and 38 deletions.
86 changes: 48 additions & 38 deletions src/pages/401.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,45 +2,55 @@ import { Box, Container, Grid, Stack } from "@mui/material";
import Head from "next/head";
import { CippImageCard } from "../components/CippCards/CippImageCard.jsx";
import { Layout as DashboardLayout } from "../layouts/index.js";
import { useRouter } from "next/router.js";

const Page = () => (
<>
<DashboardLayout>
<Head>
<title>404 - Not Found</title>
</Head>
<Box
sx={{
flexGrow: 1,
py: 4,
height: "100vh", // Full height of the viewport
}}
>
<Container maxWidth={false}>
<Stack spacing={6} sx={{ height: "100%" }}>
<Grid
container
spacing={3}
justifyContent="center" // Center horizontally
alignItems="center" // Center vertically
sx={{ height: "100%" }} // Ensure the container takes full height
>
<Grid item xs={12} md={6}>
<CippImageCard
isFetching={false}
imageUrl="/assets/illustrations/undraw_articles_wbpb.svg"
text="It seems like you're not allowed to be here. Let's go to the homepage to see if we know where we need to go next."
title="Error 401 - Not allowed"
linkText={"Return"}
link={"/"}
/>
const Page = () => {
const router = useRouter();

useEffect(() => {
if (router.asPath.startsWith("/api")) {
return "Access Denied.";
}
}, [router.asPath]);
return (
<>
<DashboardLayout>
<Head>
<title>404 - Not Found</title>
</Head>
<Box
sx={{
flexGrow: 1,
py: 4,
height: "100vh", // Full height of the viewport
}}
>
<Container maxWidth={false}>
<Stack spacing={6} sx={{ height: "100%" }}>
<Grid
container
spacing={3}
justifyContent="center" // Center horizontally
alignItems="center" // Center vertically
sx={{ height: "100%" }} // Ensure the container takes full height
>
<Grid item xs={12} md={6}>
<CippImageCard
isFetching={false}
imageUrl="/assets/illustrations/undraw_articles_wbpb.svg"
text="It seems like you're not allowed to be here. Let's go to the homepage to see if we know where we need to go next."
title="Error 401 - Not allowed"
linkText={"Return"}
link={"/"}
/>
</Grid>
</Grid>
</Grid>
</Stack>
</Container>
</Box>
</DashboardLayout>
</>
);
</Stack>
</Container>
</Box>
</DashboardLayout>
</>
);
};

export default Page;

0 comments on commit f64a31c

Please sign in to comment.