mirror of
https://github.com/jhd3197/ServerKit.git
synced 2026-12-01 20:55:16 +09:00
10 lines
271 B
JavaScript
10 lines
271 B
JavaScript
import { createContext, useContext } from 'react';
|
|
|
|
export const AIContext = createContext(null);
|
|
|
|
export function useServerkitAI() {
|
|
const ctx = useContext(AIContext);
|
|
if (!ctx) throw new Error('useServerkitAI must be used within AIProvider');
|
|
return ctx;
|
|
}
|