jiti-meet/react/features/welcome/actions.js

40 lines
899 B
JavaScript

// @flow
import {
SET_SIDEBAR_VISIBLE,
SET_WELCOME_PAGE_LISTS_DEFAULT_PAGE
} from './actionTypes';
/**
* Sets the visibility of {@link WelcomePageSideBar}.
*
* @param {boolean} visible - If the {@code WelcomePageSideBar} is to be made
* visible, {@code true}; otherwise, {@code false}.
* @returns {{
* type: SET_SIDEBAR_VISIBLE,
* visible: boolean
* }}
*/
export function setSideBarVisible(visible: boolean) {
return {
type: SET_SIDEBAR_VISIBLE,
visible
};
}
/**
* Sets the default page index of {@link WelcomePageLists}.
*
* @param {number} pageIndex - The index of the default page.
* @returns {{
* type: SET_WELCOME_PAGE_LISTS_DEFAULT_PAGE,
* pageIndex: number
* }}
*/
export function setWelcomePageListsDefaultPage(pageIndex: number) {
return {
type: SET_WELCOME_PAGE_LISTS_DEFAULT_PAGE,
pageIndex
};
}