Skip to content

Commit a3424b2

Browse files
Removed selectProposalAction and replaced it with getLoginInfo
1 parent 1257358 commit a3424b2

File tree

2 files changed

+2
-16
lines changed

2 files changed

+2
-16
lines changed

ui/src/actions/login.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,8 @@ export function selectProposal(number, navigate) {
7070
try {
7171
await sendSelectProposal(number);
7272
navigate('/');
73-
dispatch(selectProposalAction(number));
73+
dispatch(hideProposalsForm());
74+
dispatch(getLoginInfo());
7475
} catch {
7576
dispatch(showErrorPanel(true, 'Server refused to select proposal'));
7677
navigate('/login');

ui/src/reducers/login.js

-15
Original file line numberDiff line numberDiff line change
@@ -46,21 +46,6 @@ function loginReducer(state = INITIAL_STATE, action = {}) {
4646
showProposalsForm: true,
4747
};
4848
}
49-
case 'SELECT_PROPOSAL': {
50-
const proposals = state.proposalList;
51-
52-
const propInfo = proposals.find((prop) => {
53-
// const name = `${prop.code}${prop.number}`;
54-
return prop.session_id === action.proposal;
55-
});
56-
57-
return {
58-
...state,
59-
selectedProposal: action.proposal,
60-
selectedProposalID: propInfo.session_id,
61-
showProposalsForm: false,
62-
};
63-
}
6449
case 'HIDE_PROPOSALS_FORM': {
6550
return { ...state, showProposalsForm: false };
6651
}

0 commit comments

Comments
 (0)