mirror of
https://github.com/fosrl/pangolin.git
synced 2026-02-02 08:09:10 +00:00
Fix naming and add update to site provider?
This commit is contained in:
@@ -1,4 +1,11 @@
|
||||
import { GetSiteResponse } from "@server/routers/site/getSite";
|
||||
import { createContext } from "react";
|
||||
|
||||
export const SiteContext = createContext<GetSiteResponse | null>(null);
|
||||
interface SiteContextType {
|
||||
site: GetSiteResponse | null;
|
||||
updateSite: (updatedSite: Partial<GetSiteResponse>) => Promise<void>;
|
||||
}
|
||||
|
||||
const SiteContext = createContext<SiteContextType | undefined>(undefined);
|
||||
|
||||
export default SiteContext;
|
||||
Reference in New Issue
Block a user