mirror of
https://github.com/antebudimir/feishin.git
synced 2026-01-01 10:23:33 +00:00
Fix various issues
This commit is contained in:
parent
46a23318af
commit
be52f61fdb
5 changed files with 39 additions and 9 deletions
|
|
@ -248,7 +248,7 @@ interface HoldButtonProps extends ButtonProps {
|
|||
}
|
||||
|
||||
export const TimeoutButton = ({ timeoutProps, ...props }: HoldButtonProps) => {
|
||||
const [_timeoutRemaining, setTimeoutRemaining] = useState(timeoutProps.duration);
|
||||
const [, setTimeoutRemaining] = useState(timeoutProps.duration);
|
||||
const [isRunning, setIsRunning] = useState(false);
|
||||
const intervalRef = useRef(0);
|
||||
|
||||
|
|
@ -279,12 +279,12 @@ export const TimeoutButton = ({ timeoutProps, ...props }: HoldButtonProps) => {
|
|||
}, [clear, isRunning, start]);
|
||||
|
||||
return (
|
||||
<_Button
|
||||
<Button
|
||||
sx={{ color: 'var(--danger-color)' }}
|
||||
onClick={startTimeout}
|
||||
{...props}
|
||||
>
|
||||
{isRunning ? 'Cancel' : props.children}
|
||||
</_Button>
|
||||
</Button>
|
||||
);
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue