diff --git a/packages/web/components/templates/ErrorLayout.tsx b/packages/web/components/templates/ErrorLayout.tsx
index ca2ed69c8..4c8881d5c 100644
--- a/packages/web/components/templates/ErrorLayout.tsx
+++ b/packages/web/components/templates/ErrorLayout.tsx
@@ -1,103 +1,42 @@
import {
- Box,
- MediumBreakpointBox,
VStack,
HStack,
+ SpanBox,
} from '../elements/LayoutPrimitives'
-import Image from 'next/image'
-import { OmnivoreNameLogo } from '../elements/images/OmnivoreNameLogo'
import { StyledText } from '../elements/StyledText'
import Link from 'next/link'
-import { theme } from '../tokens/stitches.config'
+import { Button } from '../elements/Button'
+import { useGetViewerQuery } from '../../lib/networking/queries/useGetViewerQuery'
type ErrorPageStatusCode = 404 | 500
type ErrorLayoutProps = {
+ message?: string
statusCode: ErrorPageStatusCode
}
export function ErrorLayout(props: ErrorLayoutProps): JSX.Element {
- return (
-
- }
- largerLayoutNode={}
- />
-
- )
-}
+ const { viewerData } = useGetViewerQuery()
+ console.log(viewerData?.me)
-function MobileErrorLayout(props: ErrorLayoutProps) {
return (
-
-
-
+
+
+
+ {props.statusCode}
+
+
+ {props.message ? props.message : 'An error occurred.'}
+
-
- {props.statusCode}
-
+
+
+
+
)
-}
-
-function MediumErrorLayout(props: ErrorLayoutProps) {
- return (
-
-
-
-
-
-
-
-
-
- {props.statusCode}
-
-
-
-
-
- )
-}
-
-type OmnivoreIllustrationProps = {
- isLargeLayout?: boolean
-}
-
-function OmnivoreIllustration({ isLargeLayout }: OmnivoreIllustrationProps) {
- return (
-
- )
-}
+}
\ No newline at end of file
diff --git a/packages/web/pages/404.tsx b/packages/web/pages/404.tsx
index 8d6e484c3..c6a04dfa0 100644
--- a/packages/web/pages/404.tsx
+++ b/packages/web/pages/404.tsx
@@ -1,16 +1,17 @@
-import { ErrorLayout } from '../components/templates/ErrorLayout'
-import { Box } from '../components/elements/LayoutPrimitives'
import Head from 'next/head'
+import { useRouter } from 'next/router'
+import { ErrorLayout } from '../components/templates/ErrorLayout'
+import { SettingsLayout } from '../components/templates/SettingsLayout'
export default function Custom404(): JSX.Element {
return (
-
+ <>
Page Not Found
- ;
-
+
+
+
+ >
)
}
diff --git a/packages/web/pages/500.tsx b/packages/web/pages/500.tsx
index 23f6a0111..0f0fafdd8 100644
--- a/packages/web/pages/500.tsx
+++ b/packages/web/pages/500.tsx
@@ -1,16 +1,16 @@
import { ErrorLayout } from '../components/templates/ErrorLayout'
-import { Box } from '../components/elements/LayoutPrimitives'
import Head from 'next/head'
+import { SettingsLayout } from '../components/templates/SettingsLayout'
export default function Custom500(): JSX.Element {
return (
-
+ <>
- Page Not Found
+ An unknown error occurred.
- ;
-
+
+
+
+ >
)
}
diff --git a/packages/web/pages/[username]/index.tsx b/packages/web/pages/[username]/index.tsx
deleted file mode 100644
index 2d4f6d952..000000000
--- a/packages/web/pages/[username]/index.tsx
+++ /dev/null
@@ -1,4 +0,0 @@
-// TODO: implement page
-export default function UserIndexPage(): JSX.Element {
- return unimplemented
-}