Update selected item color in Pass menu
[ProtonMail-WebClient.git] / packages / pass / store / reducers / import.ts
blobdad1462006baa422901a4a6238e206ed120e36d2
1 import type { Action, Reducer } from 'redux';
3 import type { ImportProvider } from '@proton/pass/lib/import/types';
4 import { importItemsSuccess } from '@proton/pass/store/actions';
5 import type { MaybeNull } from '@proton/pass/types';
7 export type ImportEntry = {
8     importedAt: number;
9     total: number;
10     ignored: string[];
11     warnings?: string[];
12     provider: ImportProvider;
14 export type ImportState = MaybeNull<ImportEntry>;
16 const importReducer: Reducer<ImportState> = (state = null, action: Action) => {
17     if (importItemsSuccess.match(action)) {
18         return action.payload;
19     }
21     return state;
24 export default importReducer;