diff --git a/app/not-found.tsx b/app/not-found.tsx new file mode 100644 index 000000000..8bc51b9c7 --- /dev/null +++ b/app/not-found.tsx @@ -0,0 +1,95 @@ +'use client' + +import { useState } from 'react' +import Link from 'next/link' +import { motion } from 'framer-motion' +import { Search, Home, Book, Users } from 'lucide-react' + +export default function NotFound({ message }: { message?: string }) { + const [searchQuery, setSearchQuery] = useState('') + + const handleSearch = (e: React.FormEvent) => { + e.preventDefault() + // Implement search functionality here + // console.log('Searching for:', searchQuery) + } + + const paperVariants = { + initial: { y: -100, opacity: 0 }, + animate: { y: 0, opacity: 1, transition: { type: 'spring', stiffness: 100 } }, + } + + return ( +
+ + + + + + + +

404

+

Page Not Found

+ +
+
+ setSearchQuery(e.target.value)} + className="w-full px-4 py-2 rounded-full border-2 border-blue-300 focus:outline-none focus:border-blue-500 pr-10" + /> + +
+
+ +
+ + + Home + + + + Documents + + + + Settings + +
+ +

+ {message || + "Sorry, we couldn’t find the page you’re looking for."} +

+ + +
+ ) +} \ No newline at end of file diff --git a/pages/404.tsx b/pages/404.tsx index 51f1cb3e4..da4619e5f 100644 --- a/pages/404.tsx +++ b/pages/404.tsx @@ -1,34 +1,94 @@ -import Link from "next/link"; +'use client' + +import { useState } from 'react' +import Link from 'next/link' +import { motion } from 'framer-motion' +import { Search, Home, Book, Users } from 'lucide-react' export default function NotFound({ message }: { message?: string }) { + const [searchQuery, setSearchQuery] = useState('') + + const handleSearch = (e: React.FormEvent) => { + e.preventDefault() + // Implement search functionality here + // console.log('Searching for:', searchQuery) + } + + const paperVariants = { + initial: { y: -100, opacity: 0 }, + animate: { y: 0, opacity: 1, transition: { type: 'spring', stiffness: 100 } }, + } + return ( - <> -
-
-
-
-

- 404 error -

-

- Page not found. -

-

- {message || - "Sorry, we couldn’t find the page you’re looking for."} -

-
- - Go back home - -
-
-
-
+
+ + + + + + + +

404

+

Page Not Found

+ +
+
+ setSearchQuery(e.target.value)} + className="w-full px-4 py-2 rounded-full border-2 border-blue-300 focus:outline-none focus:border-blue-500 pr-10" + /> + +
+
+ +
+ + + Home + + + + Documents + + + + Settings +
- - ); +

+ {message || + "Sorry, we couldn’t find the page you’re looking for."} +

+ + +
+ ) } diff --git a/pages/view/[linkId]/index.tsx b/pages/view/[linkId]/index.tsx index 1ee3b34c6..52b9c01e2 100644 --- a/pages/view/[linkId]/index.tsx +++ b/pages/view/[linkId]/index.tsx @@ -3,7 +3,7 @@ import { useRouter } from "next/router"; import { useEffect, useState } from "react"; -import NotFound from "@/pages/404"; +import NotFound from "@/app/not-found"; import { Brand, DataroomBrand } from "@prisma/client"; import Cookies from "js-cookie"; import { useSession } from "next-auth/react"; diff --git a/pages/view/domains/[domain]/[slug]/index.tsx b/pages/view/domains/[domain]/[slug]/index.tsx index 154c413c3..caa587feb 100644 --- a/pages/view/domains/[domain]/[slug]/index.tsx +++ b/pages/view/domains/[domain]/[slug]/index.tsx @@ -3,7 +3,7 @@ import { useRouter } from "next/router"; import { useEffect, useState } from "react"; -import NotFound from "@/pages/404"; +import NotFound from "@/app/not-found"; import { Brand, DataroomBrand } from "@prisma/client"; import Cookies from "js-cookie"; import { useSession } from "next-auth/react";