Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- export interface TalksState extends EntityState<Talk> {
- filters: Filters;
- watched: { [id: number]: boolean };
- }
- export interface TalksPartialState {
- readonly talks: TalksState;
- }
- export const talksAdapter: EntityAdapter<Talk> = createEntityAdapter<Talk>();
- export const initialState: TalksState = talksAdapter.getInitialState({
- filters: { speaker: '', title: '', minRating: 0 },
- watched: {}
- });
- const talksReducer = createReducer(
- initialState,
- // on(TalksActions.talksUpdated, (state, { talks, filters }) =>
- // on(TalksActions.talkUpdated, (state, { talk }) =>
- // on(TalksActions.rate, (state, { talkId, rating }) => {
- // on(TalksActions.unrate, (state, { talkId }) =>
- // on(TalksActions.watch, (state, { talkId }) =>
- );
- export function reducer(state: TalksState | undefined, action: Action) {
- return talksReducer(state, action);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement