Live location tracking and playback for the game "manhunt"
at ben/frontend 25 lines 722 B view raw
1import React from "react"; 2import { commands, PlayerProfile } from "@/bindings"; 3 4export default function SetupScreen() { 5 const [displayName, setName] = React.useState("User"); 6 7 const onSave = async () => { 8 const profile = { display_name: displayName, pfp_base64: null } as PlayerProfile; 9 await commands.completeSetup(profile); 10 }; 11 12 return ( 13 <> 14 <input 15 name="displayName" 16 value={displayName} 17 placeholder="Display Name" 18 onChange={(e) => setName(e.target.value)} 19 /> 20 <button disabled={displayName === ""} onClick={onSave}> 21 Save 22 </button> 23 </> 24 ); 25}