refacto: découpage composants — 5 extractions
All checks were successful
CI/CD — Build & Deploy / Build & Deploy (push) Successful in 34s

- MonsterCard, CombatViews (Log+Multi+History), CreateCharacter
- RarityBadge + RarityDot partagés (Guide, Drawer, pages)
- CombatPage 341→215 lignes (−37%)
- DashboardPage 368→307 lignes (−17%)
- 9 composants dans components/
This commit is contained in:
2026-03-24 23:50:55 +01:00
parent 71070b2e76
commit 9eff6d541e
8 changed files with 232 additions and 214 deletions

View File

@@ -1,14 +1,8 @@
import { useState, useEffect, useRef } from 'react';
import { Search, X } from 'lucide-react';
import { useGuideData } from '../hooks/useGuideData';
const RARITY_COLORS: Record<string, string> = {
common: '#9ca3af', rare: '#5ba4f5', epic: '#a78bfa', legendary: '#f4c94e',
};
function RarityDot({ rarity }: { rarity: string }) {
return <span style={{ display: 'inline-block', width: 6, height: 6, borderRadius: '50%', background: RARITY_COLORS[rarity] ?? '#6b7a99', marginRight: 4 }} />;
}
import { RARITY_COLORS } from '../constants';
import { RarityDot } from './RarityBadge';
export function GuideDrawer({ open, onClose }: { open: boolean; onClose: () => void }) {
const [search, setSearch] = useState('');