diff --git a/components/DecksEditModal.js b/components/DecksEditModal.js
new file mode 100644
index 0000000..eed667b
--- /dev/null
+++ b/components/DecksEditModal.js
@@ -0,0 +1,80 @@
+import { Modal, Input, Button } from './ui';
+import { DECK_INPUT_FIELD_CLASS } from '../lib/deck-format-utils.js';
+
+export default function DecksEditModal({
+ editingDeck,
+ setEditingDeck,
+ onClose,
+ onEdit,
+}) {
+ return (
+
+ {editingDeck && (
+
+ )}
+
+ );
+}
diff --git a/components/DecksGrid.js b/components/DecksGrid.js
new file mode 100644
index 0000000..4e78765
--- /dev/null
+++ b/components/DecksGrid.js
@@ -0,0 +1,98 @@
+import Link from 'next/link';
+import { Button } from './ui';
+import { DECK_FORMAT_BADGE_STYLE, getDeckFormatIcon } from '../lib/deck-format-utils.js';
+
+export default function DecksGrid({ decks, onEditDeck, onDeleteDeck, onCreateDeck }) {
+ if (decks.length === 0) {
+ return (
+
+
🃏
+
+ No decks yet
+
+
+ Create your first deck to get started
+
+
+
+ );
+ }
+
+ return (
+
+ {decks.map((deck) => (
+
+
+
+ {getDeckFormatIcon(deck.format)}
+
+ {deck.format}
+
+
+
+
+
+
+
+
+
+ {deck.name}
+
+
+ {deck.description && (
+
+ {deck.description}
+
+ )}
+
+
+ {deck.card_count || 0} cards
+ {deck.is_public && (
+ Public
+ )}
+
+
+
+
+
+
+
+
+
+
+
+ ))}
+
+ );
+}
diff --git a/pages/decks.js b/pages/decks.js
index a8dc945..760ecf3 100644
--- a/pages/decks.js
+++ b/pages/decks.js
@@ -3,8 +3,9 @@ import { useRouter } from 'next/router';
import Link from 'next/link';
import Layout from '../components/Layout';
import DecksCreateModal from '../components/DecksCreateModal';
-import { Modal, Input, Button } from '../components/ui';
-import { DECK_FORMAT_BADGE_STYLE, DECK_INPUT_FIELD_CLASS, getDeckFormatIcon } from '../lib/deck-format-utils.js';
+import DecksEditModal from '../components/DecksEditModal';
+import DecksGrid from '../components/DecksGrid';
+import { Button } from '../components/ui';
import { useAuth } from '../lib/use-auth';
/* 2026-06-04 design-sweep pass: the Tailwind token classes that this
@@ -210,93 +211,12 @@ export default function Decks() {
- {/* Decks Grid */}
- {decks.length === 0 ? (
-
-
🃏
-
- No decks yet
-
-
- Create your first deck to get started
-
-
-
- ) : (
-
- {decks.map((deck) => (
-
-
-
- {getDeckFormatIcon(deck.format)}
-
- {deck.format}
-
-
-
-
-
-
-
-
-
- {deck.name}
-
-
- {deck.description && (
-
- {deck.description}
-
- )}
-
-
- {deck.card_count || 0} cards
- {deck.is_public && (
- Public
- )}
-
-
-
-
-
-
-
-
-
-
-
- ))}
-
- )}
+ setShowCreateModal(true)}
+ />
- setEditingDeck(null)}
- title="Edit Deck"
- size="md"
- >
- {editingDeck && (
-
- )}
-
+ onEdit={handleEditDeck}
+ />
);