Skip to content

Commit

Permalink
Move countodnw outside of button
Browse files Browse the repository at this point in the history
  • Loading branch information
tobbe-j committed Nov 12, 2023
1 parent 4948e79 commit 8f73f99
Showing 1 changed file with 14 additions and 13 deletions.
27 changes: 14 additions & 13 deletions dance-app/src/sections/recording.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -114,19 +114,20 @@ const RecordingPage = ({
Back
</Button>
<div className="record-button">
<Button
onClick={recordingRef.current ? countDown : initCamera}
variant="outlined"
className={classes.recordButton}
>
{showCountDown ? (
<span className="countdown" />
) : (
<Typography variant="h2">
{recordingRef.current ? "Record" : "Start"}
</Typography>
)}
</Button>
{showCountDown ? (
<div className="countdown" />
) : (
<Button
onClick={recordingRef.current ? countDown : initCamera}
variant="outlined"
className={classes.recordButton}
sx={{ backgroundColor: "rgba(1, 191, 200, 0.1)" }}
>
<Typography variant="h2">
{recordingRef.current ? "Start" : "Get ready"}
</Typography>
</Button>
)}
</div>
</header>
<div className="container">
Expand Down

0 comments on commit 8f73f99

Please sign in to comment.