From 56ffe8e165bdab7a271f060f29065a420c7e3e1c Mon Sep 17 00:00:00 2001 From: Siddharth Upamanyu Date: Fri, 15 Jul 2022 21:31:24 +0530 Subject: [PATCH 1/2] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2906859..9bc1b51 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ This project is the UI for the Forever Cloud App Exchange In the project directory, you can run: -### `npm start` +### `npm run start:dev` Runs the app in the development mode.
Open [http://localhost:3000](http://localhost:3000) to view it in the browser. From 792e896119061d5e70fa2c87d72fcbdd68172ffc Mon Sep 17 00:00:00 2001 From: siddharthupamanyu Date: Wed, 12 Apr 2023 17:45:03 +0530 Subject: [PATCH 2/2] commented code to remove duplicates --- src/app/route/Routes.js | 1 - src/redux/actions/authenticationActions.js | 1 - src/redux/reducers/authenticationReducer.js | 14 +++++++------- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/src/app/route/Routes.js b/src/app/route/Routes.js index b7fceb0..698e48f 100644 --- a/src/app/route/Routes.js +++ b/src/app/route/Routes.js @@ -11,7 +11,6 @@ function Routes() { const state = useSelector(state => ({ id: state.auth.userId, userList: state.auth.userList })) const dispatch = useDispatch(); let location = useLocation(); - console.log({ routes: location.search }) useEffect(() => { dispatch(setRoleName(location.search?.split("=")[1])); }, []); diff --git a/src/redux/actions/authenticationActions.js b/src/redux/actions/authenticationActions.js index cdfa587..5656cbe 100644 --- a/src/redux/actions/authenticationActions.js +++ b/src/redux/actions/authenticationActions.js @@ -56,7 +56,6 @@ export const setAgentAccess = payload => { } export const currentUser = (props) => { - console.log(props) return async (dispatch, getState) => { try { let response diff --git a/src/redux/reducers/authenticationReducer.js b/src/redux/reducers/authenticationReducer.js index aa33087..ec64704 100644 --- a/src/redux/reducers/authenticationReducer.js +++ b/src/redux/reducers/authenticationReducer.js @@ -85,15 +85,16 @@ const authenticationReducer = (state = defaultState, action) => { } }) .filter(Boolean); - const removeDuplicates = Array.from( - new Set(listOfRoles.map((a) => a.contactId)) - ).map((id) => { - return listOfRoles.find((a) => a.contactId === id); - }); + //commenting, this seems unnecessary + // const removeDuplicates = Array.from( + // new Set(listOfRoles.map((a) => a.contactId)) + // ).map((id) => { + // return listOfRoles.find((a) => a.contactId === id); + // }); return { ...state, franchiseList: [ - ...removeDuplicates, + ...listOfRoles, { contactId: state.userData.contact_id, profileId: state.userData.profile_id, @@ -105,7 +106,6 @@ const authenticationReducer = (state = defaultState, action) => { }; case SET_PROFILE_ID: const profileId = action.profileId; - console.log({ profileId: profileId }) const newUserId = profileId?.split("//")?.pop()?.split(".")?.shift(); return { ...state,