import { useQuery } from '@tanstack/react-query' import { q } from '../api/queries' import { CommandButton, CommandCard } from '../commands/CommandCard' import { Empty, ErrorNotice, Loading } from '../ui/Notice' import { Actions, Card, PageHead } from '../ui/Page' /** Everything that changes which game is assigned. */ export function Picks() { const { data, error } = useQuery(q.status) const none = data !== undefined && data.manual_picks.length === 0 && data.kept_picks.length === 0 return ( <> Assigned: {data.current_game_name} : 'Which game you are playing, and how to move on.'} /> {error && } {!data && !error && } {none && ( No manual picks. "Lock in a game" adds one and locks most commands for 14 days. )}
    {data?.manual_picks.map((p) => (
  • {p.name} · picked {p.age_days} d ago · {p.app_id}
  • ))} {/* Released, expired or kept by "Pick…": still installed and playable. */} {data?.kept_picks.map((p) => (
  • {p.name} · kept · no lock · {p.app_id}
  • ))}
{none && (
)}
) }