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/participants-pane/components/breakout-rooms/components/web/LeaveButton.tsx

28 lines
1.0 KiB

import React, { useCallback } from 'react';
import { useTranslation } from 'react-i18next';
import { useDispatch } from 'react-redux';
import { createBreakoutRoomsEvent } from '../../../../../analytics/AnalyticsEvents';
import { sendAnalytics } from '../../../../../analytics/functions';
import Button from '../../../../../base/ui/components/web/Button';
import { BUTTON_TYPES } from '../../../../../base/ui/constants.web';
import { moveToRoom } from '../../../../../breakout-rooms/actions';
export const LeaveButton = () => {
const { t } = useTranslation();
const dispatch = useDispatch();
const onLeave = useCallback(() => {
sendAnalytics(createBreakoutRoomsEvent('leave'));
dispatch(moveToRoom());
}, [ dispatch ]);
return (
<Button
accessibilityLabel = { t('breakoutRooms.actions.leaveBreakoutRoom') }
fullWidth = { true }
labelKey = { 'breakoutRooms.actions.leaveBreakoutRoom' }
onClick = { onLeave }
type = { BUTTON_TYPES.DESTRUCTIVE } />
);
};