Significantly reduce the number of re-renders on the console page when stats are flowing

This commit is contained in:
Dane Everitt 2020-10-03 19:36:26 -07:00
parent 5fc4444f5a
commit 6b52a36b31
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
4 changed files with 148 additions and 110 deletions

View file

@ -30,7 +30,7 @@ import StartupContainer from '@/components/server/startup/StartupContainer';
import requireServerPermission from '@/hoc/requireServerPermission';
const ServerRouter = ({ match, location }: RouteComponentProps<{ id: string }>) => {
const { rootAdmin } = useStoreState(state => state.user.data!);
const rootAdmin = useStoreState(state => state.user.data!.rootAdmin);
const [ error, setError ] = useState('');
const [ installing, setInstalling ] = useState(false);