fix remaining eslint error

This commit is contained in:
DaneEveritt 2022-06-26 15:30:05 -04:00
parent dc84af9937
commit 922d75f471
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
15 changed files with 30 additions and 28 deletions

View file

@ -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);
});

View file

@ -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) =>