source: jobvista-frontend/src/redux/reducers/imagesReducer.js@ 0f0add0

main
Last change on this file since 0f0add0 was 08f82ec, checked in by 223021 <daniel.ilievski.2@…>, 2 weeks ago

Did more refactoring

  • Property mode set to 100644
File size: 805 bytes
Line 
1import {SET_LOGO_URL, SET_PROFILE_PIC_URL} from "../actionTypes";
2
3const initialState = {
4 profilePictures: {},
5 logos: {}
6}
7
8const ImagesReducer = (state = initialState, action) => {
9
10 switch (action.type) {
11 case SET_PROFILE_PIC_URL:
12 return{
13 ...state,
14 profilePictures: {
15 ...state.profilePictures, [action.payload.jobSeekerId]: action.payload.profilePicUrl
16 }
17 }
18 case SET_LOGO_URL:
19 return {
20 ...state,
21 logos: {
22 ...state.logos, [action.payload.recruiterId]: action.payload.logoUrl
23 }
24 }
25 default:
26 return {
27 ...state,
28 };
29 }
30}
31
32export default ImagesReducer
Note: See TracBrowser for help on using the repository browser.