Remove more references to useServer
This commit is contained in:
parent
c4418640eb
commit
1598dac6f8
15 changed files with 47 additions and 62 deletions
|
@ -1,7 +1,8 @@
|
|||
import React, { useEffect, useState } from 'react';
|
||||
import React, { memo, useEffect, useState } from 'react';
|
||||
import { ServerContext } from '@/state/server';
|
||||
import { PowerAction } from '@/components/server/ServerConsole';
|
||||
import Button from '@/components/elements/Button';
|
||||
import isEqual from 'react-fast-compare';
|
||||
|
||||
const StopOrKillButton = ({ onPress }: { onPress: (action: PowerAction) => void }) => {
|
||||
const [ clicked, setClicked ] = useState(false);
|
||||
|
@ -27,4 +28,4 @@ const StopOrKillButton = ({ onPress }: { onPress: (action: PowerAction) => void
|
|||
);
|
||||
};
|
||||
|
||||
export default StopOrKillButton;
|
||||
export default memo(StopOrKillButton, isEqual);
|
||||
|
|
Reference in a new issue