UNPKG

@oberoncms/core

Version:

OberonCMS is a cloud deployable CMS written in typescript based on the Puck visual editor

23 lines (16 loc) 483 B
import { useContext } from "react" import { ActionsContext, ClientContext } from "../components/provider" export const useOberonActions = () => { const context = useContext(ActionsContext) if (!context) { throw new Error("No Oberon Server Actions provided") } return context } export const useOberonClientContext = () => { const context = useContext(ClientContext) if (!context) { throw new Error("No Oberon Client Context provided") } return context }