Reset state after logout & changing a job

main
Boris Sekachev 5 years ago
parent 5735efe72f
commit e4a8159ca1

@ -1,6 +1,6 @@
{
"name": "cvat-ui",
"version": "1.11.4",
"version": "1.11.5",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

@ -1,6 +1,6 @@
{
"name": "cvat-ui",
"version": "1.11.4",
"version": "1.11.5",
"description": "CVAT single-page application",
"main": "src/index.tsx",
"scripts": {

@ -5,6 +5,7 @@
import consts from 'consts';
import { AnnotationActionTypes } from 'actions/annotation-actions';
import { ReviewActionTypes } from 'actions/review-actions';
import { AuthActionTypes } from 'actions/auth-actions';
import { ReviewState } from './interfaces';
const defaultState: ReviewState = {
@ -184,6 +185,10 @@ export default function (state: ReviewState = defaultState, action: any): Review
issuesHidden: hidden,
};
}
case AnnotationActionTypes.CLOSE_JOB:
case AuthActionTypes.LOGOUT_SUCCESS: {
return { ...defaultState };
}
default:
return state;
}

Loading…
Cancel
Save