diff --git a/packages/shared/src/components/ProfileMenu/sections/AccountSection.tsx b/packages/shared/src/components/ProfileMenu/sections/AccountSection.tsx index b20f9f8c617..9fb96afdda6 100644 --- a/packages/shared/src/components/ProfileMenu/sections/AccountSection.tsx +++ b/packages/shared/src/components/ProfileMenu/sections/AccountSection.tsx @@ -25,7 +25,7 @@ export const AccountSection = (): ReactElement => { icon: SettingsIcon, }, { - title: 'Subscriptions', + title: 'Payment & Subscription', href: `${settingsUrl}/subscription`, icon: CreditCardIcon, }, diff --git a/packages/shared/src/components/cards/common/SquadOptionsButton.tsx b/packages/shared/src/components/cards/common/SquadOptionsButton.tsx index 23e2cc32b2c..313d64b2be7 100644 --- a/packages/shared/src/components/cards/common/SquadOptionsButton.tsx +++ b/packages/shared/src/components/cards/common/SquadOptionsButton.tsx @@ -27,6 +27,7 @@ import useFeedSettings from '../../../hooks/useFeedSettings'; import { useShareOrCopyLink } from '../../../hooks/useShareOrCopyLink'; import { LogEvent } from '../../../lib/log'; import { plusUrl } from '../../../lib/constants'; +import { visibleOnGroupHover } from './common'; interface SquadOptionsButtonProps { squad: Squad; @@ -39,7 +40,7 @@ export function SquadOptionsButton({ }: SquadOptionsButtonProps): ReactElement { const { openModal } = useLazyModal(); const { user } = useAuthContext(); - const { data: campaign } = useCampaignById(squad.flags.campaignId); + const { data: campaign } = useCampaignById(squad.flags?.campaignId ?? ''); const isBooster = campaign && user?.id === campaign.user.id; const [, onShareOrCopy] = useShareOrCopyLink({ link: squad.permalink, @@ -57,7 +58,11 @@ export function SquadOptionsButton({ const options = useMemo(() => { const blockAction = isSourceBlocked ? unblockSource : blockSource; const list: MenuItemProps[] = [ - { label: 'Share via', icon: , action: onShareOrCopy }, + { + label: 'Share via', + icon: , + action: () => onShareOrCopy(), + }, { label: 'Hide', icon: , @@ -81,7 +86,7 @@ export function SquadOptionsButton({ if (isBooster) { list.unshift({ - label: 'Manade Ad', + label: 'Manage ad', icon: , action: () => openModal({ @@ -110,7 +115,7 @@ export function SquadOptionsButton({ variant={ButtonVariant.Tertiary} icon={} size={ButtonSize.Small} - className={classNames('invisible z-1 group-hover:visible', className)} + className={classNames(visibleOnGroupHover, 'z-1', className)} /> diff --git a/packages/shared/src/components/cards/highlight/HighlightCardOptions.tsx b/packages/shared/src/components/cards/highlight/HighlightCardOptions.tsx index 0f8e49352cb..d930163b7c3 100644 --- a/packages/shared/src/components/cards/highlight/HighlightCardOptions.tsx +++ b/packages/shared/src/components/cards/highlight/HighlightCardOptions.tsx @@ -5,6 +5,7 @@ import { useQueryClient } from '@tanstack/react-query'; import { Button, ButtonSize, ButtonVariant } from '../../buttons/Button'; import { EyeCancelIcon, MenuIcon as KebabIcon, PinIcon } from '../../icons'; import { MenuIcon } from '../../MenuIcon'; +import { visibleOnGroupHover } from '../common/common'; import { DropdownMenu, DropdownMenuContent, @@ -70,10 +71,7 @@ const HighlightCardOptionsContent = ({ variant={ButtonVariant.Tertiary} size={ButtonSize.Small} icon={} - className={classNames( - 'invisible z-1 my-auto group-hover:visible', - className, - )} + className={classNames(visibleOnGroupHover, 'z-1 my-auto', className)} /> diff --git a/packages/shared/src/components/comments/CommentActionButtons.tsx b/packages/shared/src/components/comments/CommentActionButtons.tsx index 39080de4568..5fd6d3f317e 100644 --- a/packages/shared/src/components/comments/CommentActionButtons.tsx +++ b/packages/shared/src/components/comments/CommentActionButtons.tsx @@ -12,6 +12,7 @@ import { FlagIcon, DownvoteIcon, AddUserIcon, + RemoveUserIcon, BlockIcon, GiftIcon, MenuIcon, @@ -258,7 +259,7 @@ function CommentActionButtonsV1({ const isFollowingUser = isFollowingContent(author?.contentPreference); commentOptions.push({ - icon: , + icon: isFollowingUser ? : , label: `${isFollowingUser ? 'Unfollow' : 'Follow'} ${authorName}`, action: () => { const opts = { diff --git a/packages/shared/src/components/comments/CommentActionButtons.v2.tsx b/packages/shared/src/components/comments/CommentActionButtons.v2.tsx index 53cd6e9f485..cbc4ecce6ee 100644 --- a/packages/shared/src/components/comments/CommentActionButtons.v2.tsx +++ b/packages/shared/src/components/comments/CommentActionButtons.v2.tsx @@ -12,6 +12,7 @@ import { FlagIcon, DownvoteIcon, AddUserIcon, + RemoveUserIcon, BlockIcon, GiftIcon, MenuIcon, @@ -258,7 +259,7 @@ export default function CommentActionButtons({ const isFollowingUser = isFollowingContent(author?.contentPreference); commentOptions.push({ - icon: , + icon: isFollowingUser ? : , label: `${isFollowingUser ? 'Unfollow' : 'Follow'} ${authorName}`, action: () => { const opts = { diff --git a/packages/shared/src/components/feeds/MobileFeedActions.tsx b/packages/shared/src/components/feeds/MobileFeedActions.tsx index 567d341fd1d..cf1085a8b10 100644 --- a/packages/shared/src/components/feeds/MobileFeedActions.tsx +++ b/packages/shared/src/components/feeds/MobileFeedActions.tsx @@ -66,6 +66,7 @@ export function MobileFeedActions(): ReactElement {