Skip to content

Commit

Permalink
Update README image format and add random color feature to LaserEyesL…
Browse files Browse the repository at this point in the history
…ogo in App component
  • Loading branch information
hathbanger committed Nov 15, 2024
1 parent 8ae500b commit 5708310
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 4 deletions.
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,7 @@ Don't trust verify [Try Out The Demo Here](https://demo.lasereyes.build)
- Xverse

## Why Laser Eyes?
<img alt="herding_cats.gif" src="https://media.giphy.com/media/v1.Y2lkPTc5MGI3NjExbW92cmM4MDExcGE1NmJtZjhka2N3M25wNm4zeDR5cWQ4YzFnNzZiNiZlcD12MV9naWZzX3NlYXJjaCZjdD1n/7MIULHLEeZyKs/giphy.gif">


![herding cats](https://media.giphy.com/media/v1.Y2lkPTc5MGI3NjExbW92cmM4MDExcGE1NmJtZjhka2N3M25wNm4zeDR5cWQ4YzFnNzZiNiZlcD12MV9naWZzX3NlYXJjaCZjdD1n/7MIULHLEeZyKs/giphy.gif)

## Community

Expand Down
20 changes: 19 additions & 1 deletion apps/demo.lasereyes.build/components/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,19 @@ const App = ({ setNetwork }: { setNetwork: (n: NetworkType) => void }) => {
}
| undefined
>()
const [selectedColor, setSelectedColor] = useState<string>(
['orange', 'pink', 'blue', 'darkBlue', 'yellow'][
Math.floor(Math.random() * 5)
]
)

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

const switchN = () => {
try {
Expand Down Expand Up @@ -412,7 +425,12 @@ const App = ({ setNetwork }: { setNetwork: (n: NetworkType) => void }) => {
</div>
</div>
<div className={'flex flex-row items-center gap-4 '}>
<LaserEyesLogo className={'m-4'} width={48} />
<LaserEyesLogo
className={'m-4'}
width={48}
onClick={address ? () => null : () => pickRandomColor()}
color={address ? 'green' : selectedColor}
/>
<div className={'grow'} />
</div>
</div>
Expand Down

0 comments on commit 5708310

Please sign in to comment.