From f165abacb25aa2e24bcfbf25341dbeb4b37d09b7 Mon Sep 17 00:00:00 2001 From: vadi Date: Thu, 10 Oct 2024 00:04:23 +1100 Subject: [PATCH] refactor: simplify 404 page layout and update collection detail view - Removed unused imports and components from `not-found.tsx` files across multiple apps (`auth`, `docs`, `hubs`). - Simplified the 404 page layout with a minimal design, removing the `Interstellar404` component and `Button` for returning to the main interface. - Updated `CollectionDetailView` to include an "Owner" heading and display the owner's username with a label indicating if the user is the owner or a contributor. - Removed the 'dark' class from the `RootLayout` body classes to streamline styling. --- apps/auth/app/layout.tsx | 2 +- apps/auth/app/not-found.tsx | 20 +++++-------------- apps/docs/app/not-found.tsx | 20 +++++-------------- apps/hubs/app/not-found.tsx | 20 +++++-------------- .../data/collections/CollectionDetailView.tsx | 12 ++++++++++- 5 files changed, 27 insertions(+), 47 deletions(-) diff --git a/apps/auth/app/layout.tsx b/apps/auth/app/layout.tsx index aa9680ee..3f29e2b8 100644 --- a/apps/auth/app/layout.tsx +++ b/apps/auth/app/layout.tsx @@ -19,7 +19,7 @@ export const metadata: Metadata = { }; export default async function RootLayout({ children }: PropsWithChildren) { - const bodyClasses = cn('dark', fontSans.className); + const bodyClasses = cn(fontSans.className); return ( diff --git a/apps/auth/app/not-found.tsx b/apps/auth/app/not-found.tsx index 501f4c25..62c30fd4 100644 --- a/apps/auth/app/not-found.tsx +++ b/apps/auth/app/not-found.tsx @@ -1,20 +1,10 @@ -import Link from 'next/link'; -import { Button } from "@repo/components/ui/button"; -import { Home } from 'lucide-react'; -import Interstellar404 from '@repo/components/not-found/Interstellar404'; - export default function NotFoundPage() { - return ( -
- -
- - - +
+
+ 404 + | + Page Not Found
) diff --git a/apps/docs/app/not-found.tsx b/apps/docs/app/not-found.tsx index 501f4c25..62c30fd4 100644 --- a/apps/docs/app/not-found.tsx +++ b/apps/docs/app/not-found.tsx @@ -1,20 +1,10 @@ -import Link from 'next/link'; -import { Button } from "@repo/components/ui/button"; -import { Home } from 'lucide-react'; -import Interstellar404 from '@repo/components/not-found/Interstellar404'; - export default function NotFoundPage() { - return ( -
- -
- - - +
+
+ 404 + | + Page Not Found
) diff --git a/apps/hubs/app/not-found.tsx b/apps/hubs/app/not-found.tsx index 501f4c25..62c30fd4 100644 --- a/apps/hubs/app/not-found.tsx +++ b/apps/hubs/app/not-found.tsx @@ -1,20 +1,10 @@ -import Link from 'next/link'; -import { Button } from "@repo/components/ui/button"; -import { Home } from 'lucide-react'; -import Interstellar404 from '@repo/components/not-found/Interstellar404'; - export default function NotFoundPage() { - return ( -
- -
- - - +
+
+ 404 + | + Page Not Found
) diff --git a/packages/components/src/data/collections/CollectionDetailView.tsx b/packages/components/src/data/collections/CollectionDetailView.tsx index 92f8afc1..6fdabc94 100644 --- a/packages/components/src/data/collections/CollectionDetailView.tsx +++ b/packages/components/src/data/collections/CollectionDetailView.tsx @@ -112,11 +112,21 @@ export const CollectionDetailView: React.FC = ({ aut
-

+

Owner

{ownerUsername.slice(0, 2).toUpperCase()} +
+

{ownerUsername}

+ { + isOwner ? ( +

You

+ ) : ( +

Contributor

+ ) + } +