Live location tracking and playback for the game "manhunt"

Loading Cover for Start Game

bwc9876.dev fc568f1d 6ad701eb

verified
+8 -5
+8 -5
frontend/src/components/MenuScreen.tsx
··· 42 42 }; 43 43 }, [setProfile]); 44 44 45 - const startLobby = useCallback(() => { 46 - commands.startLobby(null, defaultSettings()); 47 - }, []); 45 + const startLobby = () => { 46 + setLoadingCover(true); 47 + commands.startLobby(null, defaultSettings()).finally(() => { 48 + setLoadingCover(false); 49 + }); 50 + }; 48 51 49 - const joinLobby = useCallback(() => { 52 + const joinLobby = () => { 50 53 setLoadingCover(true); 51 54 const code = window.prompt("Enter join code"); 52 55 if (!code) { ··· 69 72 .catch(() => { 70 73 setLoadingCover(false); 71 74 }); 72 - }, []); 75 + }; 73 76 74 77 const onEditName = () => { 75 78 const newName = window.prompt("Enter New Name");