Fix kill button not showing up when restarting
This commit is contained in:
parent
c0f7c9bbf3
commit
231ff0386c
3 changed files with 11 additions and 8 deletions
|
@ -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 (
|
||||
|
|
Reference in a new issue