Remove more references to useServer

This commit is contained in:
Dane Everitt 2020-08-25 21:39:00 -07:00
parent c4418640eb
commit 1598dac6f8
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
15 changed files with 47 additions and 62 deletions

View file

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