This commit is contained in:
Developer
2026-03-10 19:04:18 +08:00
parent 18eebfb0d2
commit cf20b016ff
18 changed files with 1106 additions and 123 deletions

19
store/videoStore.ts Normal file
View File

@@ -0,0 +1,19 @@
import { create } from 'zustand';
interface VideoStore {
isActive: boolean;
bvid: string;
title: string;
cover: string;
setVideo: (bvid: string, title: string, cover: string) => void;
clearVideo: () => void;
}
export const useVideoStore = create<VideoStore>(set => ({
isActive: false,
bvid: '',
title: '',
cover: '',
setVideo: (bvid, title, cover) => set({ isActive: true, bvid, title, cover }),
clearVideo: () => set({ isActive: false }),
}));