feat: Implement a cancel button
This commit is contained in:
@@ -45,6 +45,7 @@ interface IState {
|
||||
review: {
|
||||
current: IReviewCard;
|
||||
|
||||
dialogOpen: boolean;
|
||||
loading: boolean;
|
||||
vocab: IVocab[];
|
||||
metadata: IReviewMetadata;
|
||||
@@ -104,6 +105,7 @@ const initialState: IState = {
|
||||
review: {
|
||||
current: {} as IReviewCard,
|
||||
|
||||
dialogOpen: false,
|
||||
loading: true,
|
||||
vocab: [],
|
||||
metadata: {} as IReviewMetadata,
|
||||
@@ -251,6 +253,12 @@ export function LateinicusApp(state: IState = initialState, action: any) {
|
||||
loadingLR: action.state,
|
||||
}),
|
||||
});
|
||||
case Actions.REVIEW_SET_DIALOG:
|
||||
return Object.assign({}, state, {
|
||||
review: Object.assign({}, state.review, {
|
||||
dialogOpen: action.state,
|
||||
}),
|
||||
});
|
||||
default:
|
||||
// Ignore the initialization call to the reducer. By that we can
|
||||
// catch all actions that are not implemented
|
||||
|
||||
Reference in New Issue
Block a user