mirror of
https://github.com/jakejarvis/sofa.git
synced 2026-08-29 01:35:39 -04:00
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>
12 lines
470 B
TypeScript
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);
|