sendou.ink/app/features/chat/useChatContext.ts
2026-03-14 16:37:04 +02:00

11 lines
375 B
TypeScript

import * as React from "react";
import type { ChatContextValue } from "./chat-provider-types";
// xxx: think how chats should expire in relation to chatCode getting returned from loaders etc.
export const ChatContext = React.createContext<ChatContextValue | null>(null);
export function useChatContext(): ChatContextValue | null {
return React.useContext(ChatContext);
}