feat: bouton Voir tout sur quêtes combat — plus de quêtes cachées derrière les grosses
All checks were successful
CI/CD — Build & Deploy / Build & Deploy (push) Successful in 33s

This commit is contained in:
2026-03-24 19:21:24 +01:00
parent dd2a025c74
commit 0c9839e1d8

View File

@@ -228,9 +228,9 @@ export function QuestPage() {
const availableCraft = availableAll.filter((q: any) => !q.repeatable && isCraftQuest(q)); const availableCraft = availableAll.filter((q: any) => !q.repeatable && isCraftQuest(q));
const availableDaily = availableAll.filter((q: any) => q.repeatable); const availableDaily = availableAll.filter((q: any) => q.repeatable);
// Stagger: show max 3 combat quests at a time const [showAllCombat, setShowAllCombat] = useState(false);
const shownCombat = availableCombat.slice(0, 3); const shownCombat = showAllCombat ? availableCombat : availableCombat.slice(0, 3);
const hiddenCount = availableCombat.length - shownCombat.length; const hiddenCount = availableCombat.length - 3;
return ( return (
<div> <div>
@@ -262,9 +262,13 @@ export function QuestPage() {
<div style={{ display: 'flex', flexDirection: 'column', gap: 6 }}> <div style={{ display: 'flex', flexDirection: 'column', gap: 6 }}>
{shownCombat.map((q: any) => <QuestCard key={q.id} pq={q} mode="available" />)} {shownCombat.map((q: any) => <QuestCard key={q.id} pq={q} mode="available" />)}
{hiddenCount > 0 && ( {hiddenCount > 0 && (
<div style={{ textAlign: 'center', fontSize: 11, color: '#6b7a99', padding: 4 }}> <button
+{hiddenCount} quête{hiddenCount > 1 ? 's' : ''} supplémentaire{hiddenCount > 1 ? 's' : ''} après celles-ci className="btn btn-ghost"
</div> style={{ width: '100%', fontSize: 11, padding: '0.3rem', marginTop: 2 }}
onClick={() => setShowAllCombat(!showAllCombat)}
>
{showAllCombat ? 'Réduire' : `Voir tout (+${hiddenCount} quête${hiddenCount > 1 ? 's' : ''})`}
</button>
)} )}
</div> </div>
) : ( ) : (