React + Vite sudoku app with 5 difficulty levels, dark mode, celebration effects, localStorage save, and deploy script. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
14 lines
287 B
JavaScript
14 lines
287 B
JavaScript
import React from 'react'
|
|
|
|
function Timer({ seconds }) {
|
|
const mins = Math.floor(seconds / 60)
|
|
const secs = seconds % 60
|
|
return (
|
|
<span className="timer">
|
|
{String(mins).padStart(2, '0')}:{String(secs).padStart(2, '0')}
|
|
</span>
|
|
)
|
|
}
|
|
|
|
export default React.memo(Timer)
|