mirror of
https://github.com/jakejarvis/sofa.git
synced 2026-08-29 03:55:38 -04:00
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>
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
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);
|
||||
Reference in New Issue
Block a user