Skip to content

Commit

Permalink
Merge pull request #157 from joshzcold/fix/buzzer-after-refresh
Browse files Browse the repository at this point in the history
Fixes buzzer button state on page refresh and improves the button image styling.
  • Loading branch information
karlromets authored Jan 15, 2025
2 parents 705b18e + 7a0d98f commit 4ca9c60
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/components/BuzzerPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,15 @@ export default function BuzzerPage(props) {

{/* Buzzer Section TODO replace with function*/}
<div className="w-full text-center">
{buzzed ? (
<Image id="buzzerButtonPressed" width={500} height={200} alt="Buzzer Button" src="/buzzed.svg" />
{buzzed || game.buzzed.map((a) => a.id).includes(props.id) ? (
<Image
className="inline-block w-1/2"
id="buzzerButtonPressed"
width={500}
height={200}
alt="Buzzer Button"
src="/buzzed.svg"
/>
) : (
<Image
id="buzzerButton"
Expand Down

0 comments on commit 4ca9c60

Please sign in to comment.