From e4a8159ca1a23442a330f5ad959be4f782bff1d1 Mon Sep 17 00:00:00 2001 From: Boris Sekachev Date: Thu, 3 Dec 2020 15:01:29 +0300 Subject: [PATCH] Reset state after logout & changing a job --- cvat-ui/package-lock.json | 2 +- cvat-ui/package.json | 2 +- cvat-ui/src/reducers/review-reducer.ts | 5 +++++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/cvat-ui/package-lock.json b/cvat-ui/package-lock.json index d213d6a7..45c2f0f4 100644 --- a/cvat-ui/package-lock.json +++ b/cvat-ui/package-lock.json @@ -1,6 +1,6 @@ { "name": "cvat-ui", - "version": "1.11.4", + "version": "1.11.5", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/cvat-ui/package.json b/cvat-ui/package.json index b8dda7db..b3f718c5 100644 --- a/cvat-ui/package.json +++ b/cvat-ui/package.json @@ -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": { diff --git a/cvat-ui/src/reducers/review-reducer.ts b/cvat-ui/src/reducers/review-reducer.ts index f7b025aa..a8c6d32e 100644 --- a/cvat-ui/src/reducers/review-reducer.ts +++ b/cvat-ui/src/reducers/review-reducer.ts @@ -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; }