import { useState, useRef } from "react" import LocalMultiForm from "./GameConfigForms/LocalMultiForm"; import CpuMultiForm from "./GameConfigForms/CpuMultiForm"; export default function Welcome() { const [localMulti, setLocalMulti] = useState(false); const [cpuMulti, setCpuMulti] = useState(false); const [value, setValue] = useState(''); const localMultiRadio = useRef(); const cpuRadio = useRef(); const handleChange = (e) => { setValue(e.target.id); if (e.target.id === 'local-multi') { setLocalMulti(true); setCpuMulti(false); } else { setLocalMulti(false); setCpuMulti(true); } } const handleClear = () => { localMultiRadio.current.checked = false; cpuRadio.current.checked = false; setLocalMulti(false); setCpuMulti(false); setValue(''); } return ( <>

Welcome to Splinter

Compete with your friends to have the lowest
possible amount of resources to your name!

Choose from the options below:

handleChange(e)}>
handleChange(e)}>
{localMulti ? : null} {cpuMulti ? : null} ) }