feat(characters): support character-scoped conversations
This commit is contained in:
@@ -2,17 +2,26 @@
|
||||
|
||||
import type { ReactNode } from "react";
|
||||
|
||||
import { DEFAULT_CHARACTER_ID } from "@/data/constants/character";
|
||||
import { ChatProvider } from "@/stores/chat/chat-context";
|
||||
import { PaymentProvider } from "@/stores/payment/payment-context";
|
||||
import { ChatAuthSync } from "@/stores/sync/chat-auth-sync";
|
||||
import { ChatPaymentSuccessSync } from "@/stores/sync/chat-payment-success-sync";
|
||||
import { PaymentSuccessSync } from "@/stores/sync/payment-success-sync";
|
||||
|
||||
export function ChatRouteProviders({ children }: { children: ReactNode }) {
|
||||
export interface ChatRouteProvidersProps {
|
||||
children: ReactNode;
|
||||
characterId?: string;
|
||||
}
|
||||
|
||||
export function ChatRouteProviders({
|
||||
children,
|
||||
characterId = DEFAULT_CHARACTER_ID,
|
||||
}: ChatRouteProvidersProps) {
|
||||
return (
|
||||
<PaymentProvider>
|
||||
<PaymentSuccessSync />
|
||||
<ChatProvider>
|
||||
<ChatProvider characterId={characterId}>
|
||||
<ChatAuthSync />
|
||||
<ChatPaymentSuccessSync />
|
||||
{children}
|
||||
|
||||
Reference in New Issue
Block a user