export default function ExitGameButton()

in app/components/exit-game-button.tsx [23:37]


export default function ExitGameButton({gameId}: { gameId: string }) {
  const router = useRouter();

  const onExitGameClick = async () => {
    const tokens = await getTokens();
    await exitGameAction({gameId, tokens});
    router.push('/');
  };

  return (
    <div>
      <button onClick={onExitGameClick} className={`border mt-1 p-2`}>◄ Exit Game</button>
    </div>
  );
}