Switch to a context store for server stuff to better support things in the future

This commit is contained in:
Dane Everitt 2019-07-09 21:25:57 -07:00
parent 16e6f3f45f
commit 986285402f
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
21 changed files with 218 additions and 148 deletions

View file

@ -1,10 +1,9 @@
import React from 'react';
import Console from '@/components/server/Console';
import { State, useStoreState } from 'easy-peasy';
import { ApplicationState } from '@/state/types';
import { ServerContext } from '@/state/server';
export default () => {
const status = useStoreState((state: State<ApplicationState>) => state.server.status);
const status = ServerContext.useStoreState(state => state.status.value);
return (
<div className={'my-10 flex'}>