"Fossies" - the Fresh Open Source Software Archive

Member "jitsi-meet-7313/react/features/participants-pane/components/breakout-rooms/components/web/AutoAssignButton.tsx" (2 Jun 2023, 985 Bytes) of package /linux/misc/jitsi-meet-7313.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) TSX (TypeScript with React) source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the last Fossies "Diffs" side-by-side code changes report for "AutoAssignButton.tsx": jitsi-meet_8319_vs_jitsi-meet_8615.

    1 import React, { useCallback } from 'react';
    2 import { useTranslation } from 'react-i18next';
    3 import { useDispatch } from 'react-redux';
    4 
    5 import Button from '../../../../../base/ui/components/web/Button';
    6 import { BUTTON_TYPES } from '../../../../../base/ui/constants.web';
    7 import { autoAssignToBreakoutRooms } from '../../../../../breakout-rooms/actions';
    8 
    9 interface IProps {
   10     className?: string;
   11 }
   12 
   13 export const AutoAssignButton = ({ className }: IProps) => {
   14     const { t } = useTranslation();
   15     const dispatch = useDispatch();
   16 
   17     const onAutoAssign = useCallback(() => {
   18         dispatch(autoAssignToBreakoutRooms());
   19     }, [ dispatch ]);
   20 
   21     return (
   22         <Button
   23             accessibilityLabel = { t('breakoutRooms.actions.autoAssign') }
   24             className = { className }
   25             fullWidth = { true }
   26             labelKey = { 'breakoutRooms.actions.autoAssign' }
   27             onClick = { onAutoAssign }
   28             type = { BUTTON_TYPES.TERTIARY } />
   29     );
   30 };