Skip to content

Instantly share code, notes, and snippets.

@hesan-aminiloo
Created May 10, 2025 09:43
Show Gist options
  • Save hesan-aminiloo/4baf888c06120e1ebc22f8347055d240 to your computer and use it in GitHub Desktop.
Save hesan-aminiloo/4baf888c06120e1ebc22f8347055d240 to your computer and use it in GitHub Desktop.
Main memory game Application file
import './App.css'
import { Controls } from './components/Controls'
import { Lights } from './components/Lights'
import { Score } from './components/Score'
import { useGame } from './hooks/useGame'
function App() {
const {
blinkSeq,
isBlinking,
score,
resetHandler,
startHandler,
lightClickHandler,
} = useGame()
return (
<>
<div className='bg-gray-800 h-screen'>
<Score score={score} />
<Lights
blinkSeq={blinkSeq}
isBlinking={isBlinking}
onLightClick={lightClickHandler}
/>
<Controls
onReset={resetHandler}
onStart={startHandler}
/>
</div>
</>
)
}
export default App
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment