mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-23 16:53:45 +02:00
Very basic implemention of frontend logic required to display backups and create a new one
This commit is contained in:
9
resources/scripts/plugins/useServer.ts
Normal file
9
resources/scripts/plugins/useServer.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import { DependencyList } from 'react';
|
||||
import { ServerContext } from '@/state/server';
|
||||
import { Server } from '@/api/server/getServer';
|
||||
|
||||
const useServer = (dependencies?: DependencyList): Server => {
|
||||
return ServerContext.useStoreState(state => state.server.data!, [ dependencies ]);
|
||||
};
|
||||
|
||||
export default useServer;
|
||||
Reference in New Issue
Block a user