From d2b80be6390c2cf5d764fecc66988756fbf4508f Mon Sep 17 00:00:00 2001 From: Randall Stillwell Date: Wed, 3 Jun 2026 08:58:23 -0500 Subject: [PATCH] Extract PublicCardsView from pages/cards.js (Brief 2). Moves the anonymous /cards landing UI into components/PublicCardsView.js so the page file can focus on AuthenticatedCards. Co-authored-by: Cursor --- components/PublicCardsView.js | 62 +++++++++++++++++++++++++++++++++++ pages/cards.js | 61 +--------------------------------- 2 files changed, 63 insertions(+), 60 deletions(-) create mode 100644 components/PublicCardsView.js diff --git a/components/PublicCardsView.js b/components/PublicCardsView.js new file mode 100644 index 0000000..649344e --- /dev/null +++ b/components/PublicCardsView.js @@ -0,0 +1,62 @@ +import Link from 'next/link'; +import Layout from './Layout'; +import { VOCAB } from '../lib/collection-vocabulary.js'; + +export default function PublicCardsView() { + return ( + +
+
+ {/* Header with login prompt */} +
+

Browse Trading Cards

+

+ Discover thousands of trading cards from popular TCGs +

+
+

Sign Up to Unlock Full Features

+

+ Create lists, add cards to {VOCAB.MY_COLLECTION}, mark favorites, and more! +

+
+ + Create Free Account + + + Sign In + +
+
+
+ + {/* Basic card browser would go here - simplified version */} +
+
+ + + +
+

Full Card Browser Coming Soon

+

+ Sign up now to get early access to our complete card database and list tools. +

+
+
+
+
+ ); +} diff --git a/pages/cards.js b/pages/cards.js index 57aa942..27f5ef6 100644 --- a/pages/cards.js +++ b/pages/cards.js @@ -3,6 +3,7 @@ import { useRouter } from 'next/router'; import Link from 'next/link'; import Layout from '../components/Layout'; import CardItem from '../components/CardItem'; +import PublicCardsView from '../components/PublicCardsView'; import BulkSelectionToolbar from '../components/BulkSelectionToolbar'; import CollectionSelectionModal from '../components/CollectionSelectionModal'; import ProtectedRoute from '../components/ProtectedRoute'; @@ -11,66 +12,6 @@ import ManaSymbolSettings from '../components/ManaSymbolSettings'; import { useAuth } from '../lib/use-auth'; import { VOCAB } from '../lib/collection-vocabulary.js'; -// Public fallback component for non-authenticated users -function PublicCardsView() { - return ( - -
-
- {/* Header with login prompt */} -
-

Browse Trading Cards

-

- Discover thousands of trading cards from popular TCGs -

-
-

Sign Up to Unlock Full Features

-

- Create lists, add cards to {VOCAB.MY_COLLECTION}, mark favorites, and more! -

-
- - Create Free Account - - - Sign In - -
-
-
- - {/* Basic card browser would go here - simplified version */} -
-
- - - -
-

Full Card Browser Coming Soon

-

- Sign up now to get early access to our complete card database and list tools. -

-
-
-
-
- ); -} - function AuthenticatedCards() { const router = useRouter(); const { user, loading: authLoading } = useAuth(); -- 2.45.2