mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2025-12-30 11:22:31 +00:00
28 lines
895 B
TypeScript
28 lines
895 B
TypeScript
/* eslint-disable lines-around-comment */
|
|
import React, { useCallback } from 'react';
|
|
import { useTranslation } from 'react-i18next';
|
|
import { useDispatch } from 'react-redux';
|
|
|
|
import Button from '../../../../../base/components/common/Button';
|
|
import { BUTTON_TYPES } from '../../../../../base/react/constants';
|
|
// @ts-ignore
|
|
import { createBreakoutRoom } from '../../../../../breakout-rooms/actions';
|
|
|
|
export const AddBreakoutRoomButton = () => {
|
|
const { t } = useTranslation();
|
|
const dispatch = useDispatch();
|
|
|
|
const onAdd = useCallback(() =>
|
|
dispatch(createBreakoutRoom())
|
|
, [ dispatch ]);
|
|
|
|
return (
|
|
<Button
|
|
accessibilityLabel = { t('breakoutRooms.actions.add') }
|
|
fullWidth = { true }
|
|
label = { t('breakoutRooms.actions.add') }
|
|
onClick = { onAdd }
|
|
type = { BUTTON_TYPES.SECONDARY } />
|
|
);
|
|
};
|