mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-21 07:43:45 +02:00
Switch to a context store for server stuff to better support things in the future
This commit is contained in:
@@ -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'}>
|
||||
|
||||
Reference in New Issue
Block a user