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

@ -14,8 +14,8 @@ import tw from 'twin.macro';
import Button from '@/components/elements/Button';
import Select from '@/components/elements/Select';
import modes from '@/modes';
import useServer from '@/plugins/useServer';
import useFlash from '@/plugins/useFlash';
import { ServerContext } from '@/state/server';
const LazyAceEditor = lazy(() => import(/* webpackChunkName: "editor" */'@/components/elements/AceEditor'));
@ -30,7 +30,8 @@ export default () => {
const history = useHistory();
const { hash } = useLocation();
const { id, uuid } = useServer();
const id = ServerContext.useStoreState(state => state.server.data!.id);
const uuid = ServerContext.useStoreState(state => state.server.data!.uuid);
const { addError, clearFlashes } = useFlash();
let fetchFileContent: null | (() => Promise<string>) = null;