()
| 5 | import Button from '../helpers/Button'; |
| 6 | |
| 7 | const ShowWhilePlaying = () => { |
| 8 | const [isPlaying, setIsPlaying] = React.useState(false); |
| 9 | |
| 10 | const [playBoop] = useSound(dunDunDunSfx, { |
| 11 | onplay: () => setIsPlaying(true), |
| 12 | onend: () => setIsPlaying(false), |
| 13 | }); |
| 14 | |
| 15 | return ( |
| 16 | <> |
| 17 | <h2>Is playing: {isPlaying.toString()}</h2> |
| 18 | <br /> |
| 19 | <Button onClick={playBoop}>Play sound</Button> |
| 20 | </> |
| 21 | ); |
| 22 | }; |
| 23 | |
| 24 | export default ShowWhilePlaying; |
nothing calls this directly
no test coverage detected
searching dependent graphs…