"use client"; import { useBlitzGame } from "../../lib/useBlitzGame"; import { ArticleView } from "./ArticleView"; import { ShareBar } from "./ShareBar"; import { useSearchAllowed } from "../../lib/useSearchAllowed"; function fmtLeft(s: number): string { const m = Math.floor(s / 60); const sec = Math.floor(s % 60); return `${m}:${String(sec).padStart(2, "0")}`; } export function BlitzScreen({ onBack }: { onBack: () => void }) { const game = useBlitzGame(); const { allowed: searchAllowed, toggle: toggleSearch } = useSearchAllowed(); const btnPrimary = "w-full min-h-11 rounded-xl text-sm font-semibold bg-[#7c3aed] text-white hover:bg-[#6d28d9] disabled:opacity-50 cursor-pointer transition-colors"; const btnGhost = "w-full min-h-11 rounded-xl text-sm font-semibold bg-[#242424] border border-[#2e2e2e] text-[#f0f0f0] hover:bg-[#1a1a1a] cursor-pointer transition-colors"; const danger = game.timeLeft < 30; if (game.phase === "setup") return (
Tu as 2 minutes pour naviguer de l'article de départ jusqu'à l'article cible en cliquant sur les liens Wikipedia. Plus tu es rapide, mieux c'est !
{game.puzzle.start} {" → "} {game.puzzle.target}
)}L'objectif était d'atteindre{" "} {game.puzzle.target}
)}{game.loadError}