mirror of
https://github.com/fosrl/pangolin.git
synced 2025-08-30 22:49:27 +02:00
Create resource working
This commit is contained in:
parent
0ff183796c
commit
091d649997
17 changed files with 721 additions and 130 deletions
11
src/contexts/resourceContext.ts
Normal file
11
src/contexts/resourceContext.ts
Normal file
|
@ -0,0 +1,11 @@
|
|||
import { GetResourceResponse } from "@server/routers/resource/getResource";
|
||||
import { createContext } from "react";
|
||||
|
||||
interface ResourceContextType {
|
||||
resource: GetResourceResponse | null;
|
||||
updateResource: (updatedResource: Partial<GetResourceResponse>) => Promise<void>;
|
||||
}
|
||||
|
||||
const ResourceContext = createContext<ResourceContextType | undefined>(undefined);
|
||||
|
||||
export default ResourceContext;
|
Loading…
Add table
Add a link
Reference in a new issue