mirror of
https://github.com/lux-tel/session-desktop.git
synced 2026-10-30 20:33:24 +00:00
19 lines
668 B
TypeScript
19 lines
668 B
TypeScript
import type { JSX } from 'react';
|
|
import { Localizer } from '../../../basic/Localizer';
|
|
import { useShowCopyCommunityUrlCb } from '../../../menuAndSettingsHooks/useCopyCommunityUrl';
|
|
import { ItemWithDataTestId } from '../MenuItemWithDataTestId';
|
|
|
|
export const CopyCommunityUrlMenuItem = ({ convoId }: { convoId: string }): JSX.Element | null => {
|
|
const copyCommunityUrlCb = useShowCopyCommunityUrlCb(convoId);
|
|
|
|
// we want to show the copyId for communities only
|
|
if (copyCommunityUrlCb) {
|
|
return (
|
|
<ItemWithDataTestId onClick={copyCommunityUrlCb}>
|
|
<Localizer token="communityUrlCopy" />
|
|
</ItemWithDataTestId>
|
|
);
|
|
}
|
|
return null;
|
|
};
|