| 123456789101112131415161718 |
- import { createContext, Dispatch, SetStateAction } from 'react';
- import { nullDispatch } from '../../../context/state';
- import { LibraryState, ModeWindow } from './types';
- export const initialLibraryState: LibraryState = {
- artists: [],
- activeArtist: null,
- activeAlbum: null,
- activeSong: null,
- modeWindow: ModeWindow.ArtistList,
- visibleSongs: [],
- };
- export const LibraryStateContext = createContext<LibraryState>(initialLibraryState);
- export const LibraryDispatchContext = createContext<Dispatch<SetStateAction<LibraryState>>>(
- nullDispatch,
- );
|