mirror of
https://github.com/lux-tel/session-desktop.git
synced 2026-10-30 20:33:24 +00:00
20 lines
569 B
TypeScript
20 lines
569 B
TypeScript
import { useConvoIdFromContext } from '../../../../contexts/ConvoIdContext';
|
|
import { ItemWithDataTestId } from '../MenuItemWithDataTestId';
|
|
import { Localizer } from '../../../basic/Localizer';
|
|
import { useShowLeaveGroupCb } from '../../../menuAndSettingsHooks/useShowLeaveGroup';
|
|
|
|
export const LeaveGroupMenuItem = () => {
|
|
const convoId = useConvoIdFromContext();
|
|
const cb = useShowLeaveGroupCb(convoId);
|
|
|
|
if (!cb) {
|
|
return null;
|
|
}
|
|
|
|
return (
|
|
<ItemWithDataTestId onClick={cb}>
|
|
<Localizer token="groupLeave" />
|
|
</ItemWithDataTestId>
|
|
);
|
|
};
|