mirror of
https://github.com/fosrl/pangolin.git
synced 2025-08-01 08:34:53 +02:00
11 lines
394 B
TypeScript
11 lines
394 B
TypeScript
|
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;
|