fix remaining eslint error
This commit is contained in:
parent
dc84af9937
commit
922d75f471
15 changed files with 30 additions and 28 deletions
|
@ -47,8 +47,10 @@ const StatusIndicatorBox = styled(GreyRowBox)<{ $status: ServerPowerState | unde
|
|||
}
|
||||
`;
|
||||
|
||||
type Timer = ReturnType<typeof setInterval>;
|
||||
|
||||
export default ({ server, className }: { server: Server; className?: string }) => {
|
||||
const interval = useRef<number>(null);
|
||||
const interval = useRef<Timer>(null) as React.MutableRefObject<Timer>;
|
||||
const [isSuspended, setIsSuspended] = useState(server.status === 'suspended');
|
||||
const [stats, setStats] = useState<ServerStats | null>(null);
|
||||
|
||||
|
@ -67,7 +69,6 @@ export default ({ server, className }: { server: Server; className?: string }) =
|
|||
if (isSuspended) return;
|
||||
|
||||
getStats().then(() => {
|
||||
// @ts-ignore
|
||||
interval.current = setInterval(() => getStats(), 30000);
|
||||
});
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ export default () => {
|
|||
clearFlashes('account:password');
|
||||
updateAccountPassword({ ...values })
|
||||
.then(() => {
|
||||
// @ts-ignore
|
||||
// @ts-expect-error this is valid
|
||||
window.location = '/auth/login';
|
||||
})
|
||||
.catch((error) =>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue