mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2025-12-30 11:22:31 +00:00
39 lines
742 B
JavaScript
39 lines
742 B
JavaScript
// @flow
|
|
|
|
import { ReducerRegistry } from '../redux';
|
|
import { PersistenceRegistry } from '../storage';
|
|
|
|
import { UPDATE_DROPBOX_TOKEN } from './actionTypes';
|
|
|
|
/**
|
|
* The default state.
|
|
*/
|
|
const DEFAULT_STATE = {
|
|
dropbox: {}
|
|
};
|
|
|
|
/**
|
|
* The redux subtree of this feature.
|
|
*/
|
|
const STORE_NAME = 'features/base/oauth';
|
|
|
|
/**
|
|
* Sets up the persistence of the feature {@code oauth}.
|
|
*/
|
|
PersistenceRegistry.register(STORE_NAME);
|
|
|
|
ReducerRegistry.register('features/base/oauth',
|
|
(state = DEFAULT_STATE, action) => {
|
|
switch (action.type) {
|
|
case UPDATE_DROPBOX_TOKEN:
|
|
return {
|
|
...state,
|
|
dropbox: {
|
|
token: action.token
|
|
}
|
|
};
|
|
default:
|
|
return state;
|
|
}
|
|
});
|