refactor(deck-creator): statisztika panel eltávolítása és layout optimalizálása
- Statisztika panel eltávolítva - Grid elrendezés egyszerűsítve - Felesleges kód eltávolítva - Jobb helykihasználás az űrlap elemeknek
This commit is contained in:
@@ -44,10 +44,7 @@ export default function DeckHeader({ deck, onUpdate, onSave, onBack }) {
|
||||
onUpdate({ [field]: value })
|
||||
}
|
||||
|
||||
const cardsCount = deck.cards?.length || 0
|
||||
const taskCards = deck.cards?.filter(card => card.type === 'task')?.length || 0
|
||||
const jokerCards = deck.cards?.filter(card => card.type === 'joker')?.length || 0
|
||||
const luckCards = deck.cards?.filter(card => card.type === 'luck')?.length || 0
|
||||
// Remove unused card count variables
|
||||
|
||||
return (
|
||||
<div className="bg-[color:var(--color-surface)] border-b border-[color:var(--color-surface-selected)] px-6 py-4">
|
||||
@@ -77,9 +74,7 @@ export default function DeckHeader({ deck, onUpdate, onSave, onBack }) {
|
||||
</div>
|
||||
|
||||
{/* Main Content Row */}
|
||||
<div className="grid grid-cols-1 lg:grid-cols-3 gap-6 items-end">
|
||||
{/* Deck Basic Info */}
|
||||
<div className="lg:col-span-2 space-y-4">
|
||||
<div className="space-y-4">
|
||||
{/* Deck Name */}
|
||||
<div>
|
||||
<label className="block text-[color:var(--color-text-muted)] text-sm font-medium mb-2">
|
||||
@@ -94,7 +89,7 @@ export default function DeckHeader({ deck, onUpdate, onSave, onBack }) {
|
||||
/>
|
||||
</div>
|
||||
|
||||
{/* Type and Privacy Row */}
|
||||
{/* Type, Privacy and Description Row */}
|
||||
<div className="grid grid-cols-1 md:grid-cols-3 gap-4">
|
||||
{/* Deck Type */}
|
||||
<div>
|
||||
@@ -215,36 +210,6 @@ export default function DeckHeader({ deck, onUpdate, onSave, onBack }) {
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Stats Panel */}
|
||||
<div className="bg-[color:var(--color-background)]/50 rounded-xl p-4 border border-[color:var(--color-surface-selected)]">
|
||||
<h3 className="text-[color:var(--color-text)] font-semibold mb-3 flex items-center gap-2">
|
||||
📊 Statisztikák
|
||||
</h3>
|
||||
|
||||
<div className="space-y-2 text-sm">
|
||||
<div className="flex justify-between items-center">
|
||||
<span className="text-[color:var(--color-text-muted)]">Összes kártya:</span>
|
||||
<span className="text-[color:var(--color-text)] font-semibold">{cardsCount}</span>
|
||||
</div>
|
||||
|
||||
<div className="flex justify-between items-center">
|
||||
<span className="text-[color:var(--color-text-muted)]">📋 Feladat:</span>
|
||||
<span className="text-[color:var(--color-question)] font-semibold">{taskCards}</span>
|
||||
</div>
|
||||
|
||||
<div className="flex justify-between items-center">
|
||||
<span className="text-[color:var(--color-text-muted)]">🃏 Joker:</span>
|
||||
<span className="text-[color:var(--color-success)] font-semibold">{jokerCards}</span>
|
||||
</div>
|
||||
|
||||
<div className="flex justify-between items-center">
|
||||
<span className="text-[color:var(--color-text-muted)]">🎲 Szerencse:</span>
|
||||
<span className="text-[color:var(--color-luck)] font-semibold">{luckCards}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user