misc_pterodactyl-panel/resources/scripts/plugins/useServer.ts

9 lines
277 B
TypeScript
Raw Normal View History

import { ServerContext } from '@/state/server';
import { Server } from '@/api/server/getServer';
2020-07-30 05:02:00 +00:00
const useServer = (dependencies?: any[] | undefined): Server => {
return ServerContext.useStoreState(state => state.server.data!, dependencies);
};
export default useServer;