Files
sofa/lib/atoms/title.ts
T
jakeandClaude Opus 4.6 6a9c9f22c6 Replace TitleInteractionProvider context with Jotai atoms
Replaces the 335-line React Context provider with a scoped Jotai store,
giving consumers granular subscriptions and stable handler callbacks.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 19:09:57 -05:00

12 lines
470 B
TypeScript

import { atom } from "jotai";
import type { Season } from "@/lib/types/title";
export const titleIdAtom = atom("");
export const titleTypeAtom = atom<"movie" | "tv">("movie");
export const titleNameAtom = atom("");
export const seasonsAtom = atom<Season[]>([]);
export const userStatusAtom = atom<string | null>(null);
export const userRatingAtom = atom(0);
export const episodeWatchesAtom = atom<string[]>([]);
export const watchingEpAtom = atom<string | null>(null);