mirror of
https://github.com/antebudimir/feishin.git
synced 2026-01-03 03:11:40 +00:00
17 lines
373 B
TypeScript
17 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;
|
||
|
|
};
|