✨ Innovative and open-source visualization application that transforms various data formats, such as JSON, YAML, XML and CSV into interactive graphs.
fix 404 & error page
AykutSarac94ea5ff7199e
diff --git a/src/pages/404.tsx b/src/pages/404.tsxindex d9a5d169..6a560641 100644--- a/src/pages/404.tsx+++ b/src/pages/404.tsx@@ -1,54 +1,30 @@import React from "react";import Head from "next/head";-import { useRouter } from "next/router";-import { Button, Text, Title } from "@mantine/core";-import styled from "styled-components";+import Link from "next/link";+import { Button, Stack, Text, Title } from "@mantine/core";import Layout from "src/layout/Layout";-const StyledNotFound = styled.div`- display: flex;- justify-content: center;- align-items: center;- flex-direction: column;- margin-top: 0 40px;- text-align: center;-`;--const StyledMessage = styled.h4`- color: ${({ theme }) => theme.FULL_WHITE};- font-size: 25px;- font-weight: 800;- margin: 10px 0;-`;--const StyledSubMessage = styled.div`- width: 50%;- color: ${({ theme }) => theme.SILVER};- margin-bottom: 25px;-`;--const StyledImageWrapper = styled.div`- width: 300px;-`;-const NotFound: React.FC = () => {- const router = useRouter();-return (<Layout><Head><meta name="robots" content="noindex,nofollow" /></Head>- <StyledNotFound>- <StyledImageWrapper>- <img src="/assets/404.svg" alt="not found" width={300} height={400} />- </StyledImageWrapper>- <Title c="dark">WIZARDS BEHIND CURTAINS?</Title>- <Text c="dark">Looks like you're lost, let's head back to the home!</Text>- <Button mt="lg" size="lg" type="button" onClick={() => router.push("/")}>- Go Home- </Button>- </StyledNotFound>+ <Stack mt={100} justify="center" align="center">+ <Title fz={150} style={{ fontFamily: "monospace" }}>+ 404+ </Title>+ <Title order={2}>Nothing to see here</Title>+ <Text c="dimmed" maw={800} style={{ textAlign: "center" }}>+ Page you are trying to open does not exist. You may have mistyped the address, or the page+ has been moved to another URL. If you think this is an error contact support.+ </Text>+ <Link href="/">+ <Button size="lg" color="gray" type="button">+ Go Home+ </Button>+ </Link>+ </Stack></Layout>);};diff --git a/src/pages/_error.tsx b/src/pages/_error.tsxindex 5246e70c..cf4487ea 100644--- a/src/pages/_error.tsx+++ b/src/pages/_error.tsx@@ -1,51 +1,32 @@import React from "react";+import Head from "next/head";import { useRouter } from "next/router";-import { Button } from "@mantine/core";-import styled from "styled-components";+import { Button, Stack, Text, Title } from "@mantine/core";+import Layout from "src/layout/Layout";-const StyledNotFound = styled.div`- display: flex;- justify-content: center;- align-items: center;- flex-direction: column;- margin-top: 0 40px;- text-align: center;-`;--const StyledMessage = styled.h4`- color: ${({ theme }) => theme.FULL_WHITE};- font-size: 25px;- font-weight: 800;- margin: 10px 0;-`;--const StyledSubMessage = styled.div`- width: 50%;- color: ${({ theme }) => theme.SILVER};- margin-bottom: 25px;-`;--const StyledImageWrapper = styled.div`- width: 300px;-`;--const NotFound: React.FC = () => {+const Custom500 = () => {const router = useRouter();return (- <StyledNotFound>- <StyledImageWrapper>- <img src="/assets/404.svg" alt="not found" width={300} height={400} />- </StyledImageWrapper>- <StyledMessage>WIZARDS BEHIND CURTAINS?</StyledMessage>- <StyledSubMessage>- Looks like you're lost, let's head back to the home!- </StyledSubMessage>- <Button type="button" onClick={() => router.push("/")}>- Go Home- </Button>- </StyledNotFound>+ <Layout>+ <Head>+ <meta name="robots" content="noindex,nofollow" />+ </Head>+ <Stack mt={100} justify="center" align="center">+ <Title fz={150} style={{ fontFamily: "monospace" }}>+ 500+ </Title>+ <Title order={2}>Something bad just happened...</Title>+ <Text c="dimmed" maw={800} style={{ textAlign: "center" }}>+ Our servers could not handle your request. Don't worry, our development team was+ already notified. Try refreshing the page.+ </Text>+ <Button size="lg" color="gray" type="button" onClick={() => router.reload()}>+ Refresh the page+ </Button>+ </Stack>+ </Layout>);};-export default NotFound;+export default Custom500;