snapshot of https://github.com/jitsi/jitsi-meet.git @ fd1749dd28f4138aa80234fc7f311b19aaffa0e7 (2026-09-15)
This commit is contained in:
34
react/features/dropbox/reducer.ts
Normal file
34
react/features/dropbox/reducer.ts
Normal file
@@ -0,0 +1,34 @@
|
||||
import PersistenceRegistry from '../base/redux/PersistenceRegistry';
|
||||
import ReducerRegistry from '../base/redux/ReducerRegistry';
|
||||
|
||||
import { UPDATE_DROPBOX_TOKEN } from './actionTypes';
|
||||
|
||||
/**
|
||||
* The redux subtree of this feature.
|
||||
*/
|
||||
const STORE_NAME = 'features/dropbox';
|
||||
|
||||
export interface IDropboxState {
|
||||
expireDate?: number;
|
||||
rToken?: string;
|
||||
token?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets up the persistence of the feature {@code dropbox}.
|
||||
*/
|
||||
PersistenceRegistry.register(STORE_NAME);
|
||||
|
||||
ReducerRegistry.register<IDropboxState>(STORE_NAME, (state = {}, action): IDropboxState => {
|
||||
switch (action.type) {
|
||||
case UPDATE_DROPBOX_TOKEN:
|
||||
return {
|
||||
...state,
|
||||
token: action.token,
|
||||
rToken: action.rToken,
|
||||
expireDate: action.expireDate
|
||||
};
|
||||
default:
|
||||
return state;
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user