feishin/src/renderer/features/songs/context/song-list-context.tsx

17 lines
373 B
TypeScript
Raw Normal View History

2023-03-05 18:28:26 -08:00
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;
};