mirror of
https://github.com/antebudimir/feishin.git
synced 2026-01-02 10:53:33 +00:00
Begin normalizing list stores
This commit is contained in:
parent
918b77eebb
commit
ae292e3a5f
22 changed files with 1057 additions and 764 deletions
16
src/renderer/features/songs/context/song-list-context.tsx
Normal file
16
src/renderer/features/songs/context/song-list-context.tsx
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
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;
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue