mirror of
https://github.com/zimplexing/OrionTV.git
synced 2026-02-15 04:14:42 +08:00
- Added LoginModal component for user login functionality. - Introduced API routes for user login, favorites, play records, and search history management. - Created JSON files for storing favorites, play records, and search history. - Updated API service to handle new endpoints and refactored data management to use API calls instead of local storage. - Adjusted data structures in types and services to align with new API responses.
16 lines
389 B
TypeScript
16 lines
389 B
TypeScript
import { create } from "zustand";
|
|
|
|
interface AuthState {
|
|
isLoginModalVisible: boolean;
|
|
showLoginModal: () => void;
|
|
hideLoginModal: () => void;
|
|
}
|
|
|
|
const useAuthStore = create<AuthState>((set) => ({
|
|
isLoginModalVisible: false,
|
|
showLoginModal: () => set({ isLoginModalVisible: true }),
|
|
hideLoginModal: () => set({ isLoginModalVisible: false }),
|
|
}));
|
|
|
|
export default useAuthStore;
|