Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
hathbanger committed Nov 15, 2024
1 parent 470037a commit 652e539
Showing 1 changed file with 19 additions and 9 deletions.
28 changes: 19 additions & 9 deletions apps/demo.lasereyes.build/components/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,18 +54,28 @@ const App = ({ setNetwork }: { setNetwork: (n: NetworkType) => void }) => {
}
| undefined
>()
const [selectedColor, setSelectedColor] = useState<string>(
['orange', 'pink', 'blue', 'darkBlue', 'yellow'][
Math.floor(Math.random() * 5)
]
type colorsType =
| 'orange'
| 'pink'
| 'blue'
| 'darkBlue'
| 'yellow'
| 'green'
| 'purple'
| 'red'
const colors = [
'orange',
'pink',
'blue',
'darkBlue',
'yellow',
] as colorsType[]
const [selectedColor, setSelectedColor] = useState<colorsType>(
colors[Math.floor(Math.random() * 5)]
)

const pickRandomColor = () => {
setSelectedColor(
['orange', 'pink', 'blue', 'darkBlue', 'yellow'][
Math.floor(Math.random() * 5)
]
)
setSelectedColor(colors[Math.floor(Math.random() * 5)])
}

const switchN = () => {
Expand Down

0 comments on commit 652e539

Please sign in to comment.