Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
jitsi-meet/react/features/welcome/reducer.js

37 lines
921 B

// @flow
import { ReducerRegistry, set } from '../base/redux';
import { PersistenceRegistry } from '../base/storage';
import {
SET_SIDEBAR_VISIBLE,
SET_WELCOME_PAGE_LISTS_DEFAULT_PAGE
} from './actionTypes';
/**
* The name of the redux store/state property which is the root of the redux
* state of the feature {@code welcome}.
*/
const STORE_NAME = 'features/welcome';
/**
* Sets up the persistence of the feature {@code welcome}.
*/
PersistenceRegistry.register(STORE_NAME, {
defaultPage: true
});
/**
* Reduces redux actions for the purposes of the feature {@code welcome}.
*/
ReducerRegistry.register(STORE_NAME, (state = {}, action) => {
switch (action.type) {
case SET_SIDEBAR_VISIBLE:
return set(state, 'sideBarVisible', action.visible);
case SET_WELCOME_PAGE_LISTS_DEFAULT_PAGE:
return set(state, 'defaultPage', action.pageIndex);
}
return state;
});