Skip to content

Commit

Permalink
Update start screen
Browse files Browse the repository at this point in the history
  • Loading branch information
Vladimir-Urik committed Apr 2, 2024
1 parent 755afee commit e74d82e
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions src/components/Game.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ interface GameProps {

export function Game({ setGradient }: GameProps) {
const [title, setTitle] = useState('')
const [truth, setTruth] = useState(true)
const [category, setCategory] = useState<'funny' | 'sexistic'>('funny')
const [, setTruth] = useState(true)
const [, setCategory] = useState<'funny' | 'sexistic'>('funny')
const [text, setText] = useState('')
const [side, setSide] = useState<'pravici' | 'levici'>('pravici')

Expand Down Expand Up @@ -37,13 +37,9 @@ export function Game({ setGradient }: GameProps) {
return randomText
}

const getRandomText = () => {
return getRandomTextWithCategory(category, truth)
}

useEffect(() => {
setText(getRandomText())
setTitle('Pravda')
setText('Vyber si kategorii pomocí kliknutí na smajlíka nebo lilek.')
setTitle('Začni hru')
}, [])

const getRandomGradient = () => {
Expand Down

0 comments on commit e74d82e

Please sign in to comment.