in app/(authenticated-pages)/page.tsx [23:41]
export default function Home() {
const {activeGameList} = useActiveGameList();
const router = useRouter();
useEffect(() => {
if (activeGameList.length > 0) {
const firstGameId = activeGameList[0].id;
router.push(`/game/${firstGameId}`);
}
}, [activeGameList, router]);
return (
<div>
<center className="p-8">
Waiting for a game.
</center>
</div>
);
}