cleanup + lint

This commit is contained in:
cv
2021-03-29 22:14:00 +02:00
parent 714f6bc377
commit 0e73ddd157
20 changed files with 1006 additions and 1374 deletions
+1 -54
View File
@@ -2,25 +2,17 @@ import { Button } from '@chakra-ui/button';
import style from './PlaybackControl.module.css';
import Countdown from '../../common/components/countdown/Countdown';
import { useState } from 'react';
import { clamp } from '../../app/utils';
import { ArrowBackIcon, ArrowForwardIcon } from '@chakra-ui/icons';
export default function PlaybackControl() {
const [time, setTime] = useState(15);
const [time] = useState(15);
const [roll, setRoll] = useState(false);
const incrementTimer = (amount = 1) => {
const t = clamp(time + amount * 60, 0, 3600);
setTime(t);
};
const defProps = {
colorScheme: 'blackAlpha',
variant: 'outline',
};
const smallSize = 50;
const midSize = 100;
const bigSize = 120;
return (
@@ -29,44 +21,7 @@ export default function PlaybackControl() {
<div className={style.timer}>
<Countdown time={time} small />
</div>
{/* <Button
width={smallSize}
{...defProps}
className={style.minu1}
disabled={roll}
onClick={() => incrementTimer(-1)}
>
-1
</Button>
<Button
width={smallSize}
{...defProps}
className={style.plus1}
disabled={roll}
onClick={() => incrementTimer()}
>
+1
</Button>
<Button
width={smallSize}
{...defProps}
className={style.minu5}
disabled={roll}
onClick={() => incrementTimer(5)}
>
-5
</Button>
<Button
width={smallSize}
{...defProps}
className={style.plus5}
disabled={roll}
onClick={() => incrementTimer(5)}
>
+5
</Button> */}
</div>
<div className={style.playbackContainer}>
<Button
width={bigSize}
@@ -84,14 +39,6 @@ export default function PlaybackControl() {
>
Pause
</Button>
{/* <Button
width={bigSize}
colorScheme='yellow'
className={style.reset}
disabled={roll}
>
Reset
</Button> */}
</div>
<div className={style.trackContainer}>
<Button