diff --git a/apps/marketing/src/app/not-found.tsx b/apps/marketing/src/app/not-found.tsx index 7dfaf9dba..9f87cdc88 100644 --- a/apps/marketing/src/app/not-found.tsx +++ b/apps/marketing/src/app/not-found.tsx @@ -1,6 +1,7 @@ 'use client'; import Image from 'next/image'; +import Link from 'next/link'; import { useRouter } from 'next/navigation'; import { motion } from 'framer-motion'; @@ -13,54 +14,52 @@ import backgroundPattern from '~/assets/background-pattern.png'; export default function NotFound() { const router = useRouter(); + return ( - +
background pattern
-
-
-

- 404 Page not found -

-

- Sorry, the page you are looking for doesn't exist or has been moved. + +

+
+

404 Page not found

+ +

Oops! Something went wrong.

+ +

+ The page you are looking for was moved, removed, renamed or might never have existed.

-
+
-
- +
); } diff --git a/apps/web/src/app/not-found.tsx b/apps/web/src/app/not-found.tsx index 07124c6ca..c8dc15086 100644 --- a/apps/web/src/app/not-found.tsx +++ b/apps/web/src/app/not-found.tsx @@ -1,66 +1,26 @@ -'use client'; +import Link from 'next/link'; -import Image from 'next/image'; -import { useRouter } from 'next/navigation'; - -import { motion } from 'framer-motion'; -import { ChevronLeft } from 'lucide-react'; - -import { cn } from '@documenso/ui/lib/utils'; +import { getServerComponentSession } from '@documenso/lib/next-auth/get-server-session'; import { Button } from '@documenso/ui/primitives/button'; -import backgroundPattern from '~/assets/background-pattern.png'; +import NotFoundPartial from '~/components/partials/not-found'; + +export default async function NotFound() { + const session = await getServerComponentSession(); -export default function NotFound() { - const router = useRouter(); return ( - -
- - background pattern - -
-
-
-

404 Page not found

-

- Oops! You found a secret page -

-

- The page you are looking for may not exist :/ -

-
- - -
-
-
-
+ + {session && ( + + )} + + {!session && ( + + )} + ); } diff --git a/apps/web/src/components/motion.tsx b/apps/web/src/components/motion.tsx deleted file mode 100644 index 2e9d19eae..000000000 --- a/apps/web/src/components/motion.tsx +++ /dev/null @@ -1,7 +0,0 @@ -'use client'; - -import { motion } from 'framer-motion'; - -export * from 'framer-motion'; - -export const MotionDiv = motion.div; diff --git a/apps/web/src/components/partials/not-found.tsx b/apps/web/src/components/partials/not-found.tsx new file mode 100644 index 000000000..0b5c2ad18 --- /dev/null +++ b/apps/web/src/components/partials/not-found.tsx @@ -0,0 +1,66 @@ +'use client'; + +import Image from 'next/image'; +import { useRouter } from 'next/navigation'; + +import { motion } from 'framer-motion'; +import { ChevronLeft } from 'lucide-react'; + +import { cn } from '@documenso/ui/lib/utils'; +import { Button } from '@documenso/ui/primitives/button'; + +import backgroundPattern from '~/assets/background-pattern.png'; + +export type NotFoundPartialProps = { + children?: React.ReactNode; +}; + +export default function NotFoundPartial({ children }: NotFoundPartialProps) { + const router = useRouter(); + + return ( +
+
+ + background pattern + +
+ +
+
+

404 Page not found

+ +

Oops! Something went wrong.

+ +

+ The page you are looking for was moved, removed, renamed or might never have existed. +

+ +
+ + + {children} +
+
+
+
+ ); +}