// Persons of interest — the mobile suspects list (own bottom-nav tab). Desktop shows // the suspect rail on the board instead, so this screen falls through to the Board there. import { useState } from 'preact/hooks' import { useGame } from '../store' import type { Suspect } from '../types' import { Checklist } from '../ui/checklist' import { BottomNav, Btn, Hud, Panel, SuspectCard } from '../ui/components' import { Board } from './board' export function SuspectsScreen() { const g = useGame() const [sel, setSel] = useState(null) // before the early return: hook order survives a live resize if (g.mode === 'desktop') return const c = g.case return (
g.nav('accuse')}>Accuse} />
{c.suspects.map((s: Suspect) => { const open = sel === s.id return (
setSel(open ? null : s.id)}> {open && (
{s.alibi}
{ e.stopPropagation(); g.nav('interro', { suspect: s.id }) }}> ▸ Interrogate {s.name.split(' ')[0]}
)}
) })}
) }