Fix naming and add update to site provider?

This commit is contained in:
Owen Schwartz
2024-10-19 12:48:07 -04:00
parent edde7a247a
commit 474bc7997e
10 changed files with 238 additions and 23 deletions

View File

@@ -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;