Fix kill button not showing up when restarting

This commit is contained in:
Dane Everitt
2020-08-13 20:47:16 -07:00
parent c0f7c9bbf3
commit 231ff0386c
3 changed files with 11 additions and 8 deletions

View File

@@ -8,7 +8,7 @@ const StopOrKillButton = ({ onPress }: { onPress: (action: PowerAction) => void
const status = ServerContext.useStoreState(state => state.status.value);
useEffect(() => {
setClicked(state => [ 'stopping' ].indexOf(status) < 0 ? false : state);
setClicked(status === 'stopping');
}, [ status ]);
return (