Connect, collaborate, and grow with a community of TypeScript developers
Fix 404 page (#392)
Sean Boult6f905ba29279
diff --git a/apps/web/package.json b/apps/web/package.jsonindex c75ac65a..155aa402 100644--- a/apps/web/package.json+++ b/apps/web/package.json@@ -39,7 +39,7 @@"lucide-react": "^0.260.0","lz-string": "^1.5.0","monaco-vim": "^0.4.0",- "next": "^13.4.10",+ "next": "^13.4.19","next-themes": "^0.2.1","react": "^18.2.0","react-day-picker": "^8.8.0",diff --git a/apps/web/src/app/not-found.tsx b/apps/web/src/app/not-found.tsxnew file mode 100644index 00000000..6abb7be9--- /dev/null+++ b/apps/web/src/app/not-found.tsx@@ -0,0 +1,8 @@+export default function NotFound() {+ return (+ <div className="flex h-screen flex-col items-center justify-center">+ <h1 className="text-4xl font-bold">404</h1>+ <p className="text-2xl">The page you are looking for is in another castle</p>+ </div>+ );+}diff --git a/apps/web/src/components/user/profile.tsx b/apps/web/src/components/user/profile.tsxindex 0e99f4ed..b727d898 100644--- a/apps/web/src/components/user/profile.tsx+++ b/apps/web/src/components/user/profile.tsx@@ -15,10 +15,12 @@ export const metadata: Metadata = {export async function Profile({ username: usernameFromQuery }: Props) {const [, username] = decodeURIComponent(usernameFromQuery).split('@');- const user = await prisma.user.findFirstOrThrow({+ if (!username) return notFound();++ const user = await prisma.user.findFirst({where: {name: {- equals: username ?? '',+ equals: username,},},include: {@@ -26,5 +28,6 @@ export async function Profile({ username: usernameFromQuery }: Props) {},});+ if (!user) return notFound();return <Dashboard user={user} />;}diff --git a/pnpm-lock.yaml b/pnpm-lock.yamlindex bc3846ff..64d7aacc 100644--- a/pnpm-lock.yaml+++ b/pnpm-lock.yaml@@ -280,11 +280,11 @@ importers:specifier: ^0.4.0version: 0.4.0(patch_hash=j3oqxjoadtct3pc6tokddngzsm)next:- specifier: ^13.4.10- version: 13.4.10([email protected])([email protected])+ specifier: ^13.4.19+ version: 13.4.19([email protected])([email protected])next-themes:specifier: ^0.2.1react:specifier: ^18.2.0version: 18.2.0@@ -646,7 +646,7 @@ importers:dependencies:'@next/eslint-plugin-next':specifier: canary- version: 13.4.10-canary.8+ version: 13.4.13-canary.13'@repo/tsconfig':specifier: workspace:*version: link:../config-typescript@@ -658,7 +658,7 @@ importers:version: 5.62.0([email protected])([email protected])'@vercel/style-guide':specifier: ^4.0.2eslint:specifier: ^8.40.0version: 8.45.0@@ -1700,10 +1700,6 @@ packages:next-auth: 4.22.1(patch_hash=mr6pbhgbmy4dt4xo4hxm5k4ym4)([email protected])([email protected])([email protected])dev: false- /@next/[email protected]:- resolution: {integrity: sha512-3G1yD/XKTSLdihyDSa8JEsaWOELY+OWe08o0LUYzfuHp1zHDA8SObQlzKt+v+wrkkPcnPweoLH1ImZeUa0A1NQ==}- dev: false-/@next/[email protected]:resolution: {integrity: sha512-FsAT5x0jF2kkhNkKkukhsyYOrRqtSxrEhfliniIq0bwWbuXLgyt3Gv0Ml+b91XwjwArmuP7NxCiGd++GGKdNMQ==}dev: false@@ -1714,21 +1710,12 @@ packages:glob: 7.1.7dev: true- /@next/[email protected]:- resolution: {integrity: sha512-DpeE4c+UJDDuV+Vsa/FiI2E7eJUzGHptx4Vz5yiiE9us8LpeFU9P9liWmstQfexZgV7to9IEzqZbHWDTvR8WPw==}+ /@next/[email protected]:+ resolution: {integrity: sha512-lEXi0QLWUuXlMQRLSk/6JUUoOcjACOKbJYPKe0R1XyF5Kf7/Czdm072UJb3betXqiWw5v54GoOOmyDaUDCn5Rw==}dependencies:glob: 7.1.7dev: false- /@next/[email protected]:- resolution: {integrity: sha512-4bsdfKmmg7mgFGph0UorD1xWfZ5jZEw4kKRHYEeTK9bT1QnMbPVPlVXQRIiFPrhoDQnZUoa6duuPUJIEGLV1Jg==}- engines: {node: '>= 10'}- cpu: [arm64]- os: [darwin]- requiresBuild: true- dev: false- optional: true-/@next/[email protected]:resolution: {integrity: sha512-vv1qrjXeGbuF2mOkhkdxMDtv9np7W4mcBtaDnHU+yJG+bBwa6rYsYSCI/9Xm5+TuF5SbZbrWO6G1NfTh1TMjvQ==}engines: {node: '>= 10'}@@ -1738,15 +1725,6 @@ packages:dev: falseoptional: true- /@next/[email protected]:- resolution: {integrity: sha512-ngXhUBbcZIWZWqNbQSNxQrB9T1V+wgfCzAor2olYuo/YpaL6mUYNUEgeBMhr8qwV0ARSgKaOp35lRvB7EmCRBg==}- engines: {node: '>= 10'}- cpu: [x64]- os: [darwin]- requiresBuild: true- dev: false- optional: true-/@next/[email protected]:resolution: {integrity: sha512-jyzO6wwYhx6F+7gD8ddZfuqO4TtpJdw3wyOduR4fxTUCm3aLw7YmHGYNjS0xRSYGAkLpBkH1E0RcelyId6lNsw==}engines: {node: '>= 10'}@@ -1756,15 +1734,6 @@ packages:dev: falseoptional: true- /@next/[email protected]:- resolution: {integrity: sha512-SjCZZCOmHD4uyM75MVArSAmF5Y+IJSGroPRj2v9/jnBT36SYFTORN8Ag/lhw81W9EeexKY/CUg2e9mdebZOwsg==}- engines: {node: '>= 10'}- cpu: [arm64]- os: [linux]- requiresBuild: true- dev: false- optional: true-/@next/[email protected]:resolution: {integrity: sha512-vdlnIlaAEh6H+G6HrKZB9c2zJKnpPVKnA6LBwjwT2BTjxI7e0Hx30+FoWCgi50e+YO49p6oPOtesP9mXDRiiUg==}engines: {node: '>= 10'}@@ -1774,15 +1743,6 @@ packages:dev: falseoptional: true- /@next/[email protected]:- resolution: {integrity: sha512-F+VlcWijX5qteoYIOxNiBbNE8ruaWuRlcYyIRK10CugqI/BIeCDzEDyrHIHY8AWwbkTwe6GRHabMdE688Rqq4Q==}- engines: {node: '>= 10'}- cpu: [arm64]- os: [linux]- requiresBuild: true- dev: false- optional: true-/@next/[email protected]:resolution: {integrity: sha512-aU0HkH2XPgxqrbNRBFb3si9Ahu/CpaR5RPmN2s9GiM9qJCiBBlZtRTiEca+DC+xRPyCThTtWYgxjWHgU7ZkyvA==}engines: {node: '>= 10'}@@ -1792,15 +1752,6 @@ packages:dev: falseoptional: true- /@next/[email protected]:- resolution: {integrity: sha512-WDv1YtAV07nhfy3i1visr5p/tjiH6CeXp4wX78lzP1jI07t4PnHHG1WEDFOduXh3WT4hG6yN82EQBQHDi7hBrQ==}- engines: {node: '>= 10'}- cpu: [x64]- os: [linux]- requiresBuild: true- dev: false- optional: true-/@next/[email protected]:resolution: {integrity: sha512-htwOEagMa/CXNykFFeAHHvMJeqZfNQEoQvHfsA4wgg5QqGNqD5soeCer4oGlCol6NGUxknrQO6VEustcv+Md+g==}engines: {node: '>= 10'}@@ -1810,15 +1761,6 @@ packages:dev: falseoptional: true- /@next/[email protected]:- resolution: {integrity: sha512-zFkzqc737xr6qoBgDa3AwC7jPQzGLjDlkNmt/ljvQJ/Veri5ECdHjZCUuiTUfVjshNIIpki6FuP0RaQYK9iCRg==}- engines: {node: '>= 10'}- cpu: [x64]- os: [linux]- requiresBuild: true- dev: false- optional: true-/@next/[email protected]:resolution: {integrity: sha512-4Gj4vvtbK1JH8ApWTT214b3GwUh9EKKQjY41hH/t+u55Knxi/0wesMzwQRhppK6Ddalhu0TEttbiJ+wRcoEj5Q==}engines: {node: '>= 10'}@@ -1828,15 +1770,6 @@ packages:dev: falseoptional: true- /@next/[email protected]:- resolution: {integrity: sha512-IboRS8IWz5mWfnjAdCekkl8s0B7ijpWeDwK2O8CdgZkoCDY0ZQHBSGiJ2KViAG6+BJVfLvcP+a2fh6cdyBr9QQ==}- engines: {node: '>= 10'}- cpu: [arm64]- os: [win32]- requiresBuild: true- dev: false- optional: true-/@next/[email protected]:resolution: {integrity: sha512-bUfDevQK4NsIAHXs3/JNgnvEY+LRyneDN788W2NYiRIIzmILjba7LaQTfihuFawZDhRtkYCv3JDC3B4TwnmRJw==}engines: {node: '>= 10'}@@ -1846,15 +1779,6 @@ packages:dev: falseoptional: true- /@next/[email protected]:- resolution: {integrity: sha512-bSA+4j8jY4EEiwD/M2bol4uVEu1lBlgsGdvM+mmBm/BbqofNBfaZ2qwSbwE2OwbAmzNdVJRFRXQZ0dkjopTRaQ==}- engines: {node: '>= 10'}- cpu: [ia32]- os: [win32]- requiresBuild: true- dev: false- optional: true-/@next/[email protected]:resolution: {integrity: sha512-Y5kikILFAr81LYIFaw6j/NrOtmiM4Sf3GtOc0pn50ez2GCkr+oejYuKGcwAwq3jiTKuzF6OF4iT2INPoxRycEA==}engines: {node: '>= 10'}@@ -1864,15 +1788,6 @@ packages:dev: falseoptional: true- /@next/[email protected]:- resolution: {integrity: sha512-g2+tU63yTWmcVQKDGY0MV1PjjqgZtwM4rB1oVVi/v0brdZAcrcTV+04agKzWtvWroyFz6IqtT0MoZJA7PNyLVw==}- engines: {node: '>= 10'}- cpu: [x64]- os: [win32]- requiresBuild: true- dev: false- optional: true-/@next/[email protected]:resolution: {integrity: sha512-YzA78jBDXMYiINdPdJJwGgPNT3YqBNNGhsthsDoWHL9p24tEJn9ViQf/ZqTbwSpX/RrkPupLfuuTH2sf73JBAw==}engines: {node: '>= 10'}@@ -4015,7 +3930,7 @@ packages:yoga-wasm-web: 0.3.0dev: false- /@vercel/[email protected](@next/[email protected])([email protected])([email protected])([email protected]):+ /@vercel/[email protected](@next/[email protected])([email protected])([email protected])([email protected]):resolution: {integrity: sha512-FroL+oOePzhw7n/I+f7zr4WNroGHT/+2TlW6WH9+CVSjMNsEyu7Qstj2mI5gWIBjT1Y2ZImKPppCzI2cIYmNZw==}engines: {node: '>=16'}peerDependencies:@@ -4035,7 +3950,7 @@ packages:dependencies:'@babel/core': 7.22.10'@babel/eslint-parser': 7.22.10(@babel/[email protected])([email protected])- '@next/eslint-plugin-next': 13.4.10-canary.8+ '@next/eslint-plugin-next': 13.4.13-canary.13'@rushstack/eslint-patch': 1.3.2'@typescript-eslint/eslint-plugin': 5.59.1(@typescript-eslint/[email protected])([email protected])([email protected])'@typescript-eslint/parser': 5.62.0([email protected])([email protected])@@ -4583,10 +4498,6 @@ packages:resolution: {integrity: sha512-dU+Tx2fsypxTgtLoE36npi3UqcjSSMNYfkqgmoEhtZrraP5VWq0K7FkWVTYa8eMPtnU/G2txVsfdCJTn9uzpuQ==}dev: false- resolution: {integrity: sha512-Wmec9pCBY8CWbmI4HsjBeQLqDTqV91nFVR83DnZpYyRnPI1wePDsTg0bGLPC5VU/3OIZV1fmxEea1b+tFKe86g==}- dev: false-resolution: {integrity: sha512-TKiyTVZxJGhsTszLuzb+6vUZSjVOAhClszBr2Ta2k9IwtNBT/4dzmL6aywt0HCgEZlmwJzXJd8yNiob6HgwTRg==}@@ -7772,18 +7683,6 @@ packages:dev: falsepatched: true- resolution: {integrity: sha512-B+AKNfYNIzh0vqQQKqQItTS8evEouKD7H5Hj3kmuPERwddR2TxvDSFZuTj6T7Jfn1oyeUyJMydPl1Bkxkh0W7A==}- peerDependencies:- next: '*'- react: '*'- react-dom: '*'- dependencies:- next: 13.4.10([email protected])([email protected])- react: 18.2.0- react-dom: 18.2.0([email protected])- dev: false-resolution: {integrity: sha512-B+AKNfYNIzh0vqQQKqQItTS8evEouKD7H5Hj3kmuPERwddR2TxvDSFZuTj6T7Jfn1oyeUyJMydPl1Bkxkh0W7A==}peerDependencies:@@ -7796,49 +7695,6 @@ packages:react-dom: 18.2.0([email protected])dev: false- resolution: {integrity: sha512-4ep6aKxVTQ7rkUW2fBLhpBr/5oceCuf4KmlUpvG/aXuDTIf9mexNSpabUD6RWPspu6wiJJvozZREhXhueYO36A==}- engines: {node: '>=16.8.0'}- hasBin: true- peerDependencies:- '@opentelemetry/api': ^1.1.0- fibers: '>= 3.1.0'- react: ^18.2.0- react-dom: ^18.2.0- sass: ^1.3.0- peerDependenciesMeta:- '@opentelemetry/api':- optional: true- fibers:- optional: true- sass:- optional: true- dependencies:- '@next/env': 13.4.10- '@swc/helpers': 0.5.1- busboy: 1.6.0- caniuse-lite: 1.0.30001516- postcss: 8.4.14- react: 18.2.0- react-dom: 18.2.0([email protected])- styled-jsx: 5.1.1([email protected])- watchpack: 2.4.0- zod: 3.21.4- optionalDependencies:- '@next/swc-darwin-arm64': 13.4.10- '@next/swc-darwin-x64': 13.4.10- '@next/swc-linux-arm64-gnu': 13.4.10- '@next/swc-linux-arm64-musl': 13.4.10- '@next/swc-linux-x64-gnu': 13.4.10- '@next/swc-linux-x64-musl': 13.4.10- '@next/swc-win32-arm64-msvc': 13.4.10- '@next/swc-win32-ia32-msvc': 13.4.10- '@next/swc-win32-x64-msvc': 13.4.10- transitivePeerDependencies:- - '@babel/core'- - babel-plugin-macros- dev: false-resolution: {integrity: sha512-HuPSzzAbJ1T4BD8e0bs6B9C1kWQ6gv8ykZoRWs5AQoiIuqbGHHdQO7Ljuvg05Q0Z24E2ABozHe6FxDvI6HfyAw==}engines: {node: '>=16.8.0'}