@venuecms/sdk-next
Version:
This is a work in progress and is heavily in flux until we launch 1.0 in February.
4 lines (3 loc) • 421 B
JavaScript
"use client";
import{getSite as r,setConfig as d}from"@venuecms/sdk";import{createContext as s,useEffect as c,useState as u}from"react";import{jsx as a}from"react/jsx-runtime";var f=s(void 0),x=({siteKey:e,children:t})=>{let[n,o]=u();return c(()=>{d({siteKey:e,options:{baseUrl:"/"}}),r().then(({data:i})=>o(i))},[e]),a(f.Provider,{value:n,children:t})};export{f as a,x as b};
//# sourceMappingURL=chunk-TMVHRY2W.mjs.map