This repository has been archived on 2025-03-19. You can view files and clone it, but cannot push or open issues or pull requests.
feishin/src/renderer/features/songs/context/song-list-context.tsx
2023-03-05 18:38:22 -08:00

16 lines
373 B
TypeScript

import { createContext, useContext } from 'react';
import { ListKey } from '/@/renderer/store';
interface SongListContextProps {
id?: string;
pageKey: ListKey;
}
export const SongListContext = createContext<SongListContextProps>({
pageKey: 'song',
});
export const useSongListContext = () => {
const ctxValue = useContext(SongListContext);
return ctxValue;
};