Skip to content

Commit

Permalink
fix: privacy link on mobile
Browse files Browse the repository at this point in the history
  • Loading branch information
idoshamun committed Feb 6, 2025
1 parent de4f1bc commit 48bb991
Showing 1 changed file with 4 additions and 34 deletions.
38 changes: 4 additions & 34 deletions packages/shared/src/components/profile/ProfileSettingsMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,13 @@ import {
DocsIcon,
TerminalIcon,
FeedbackIcon,
HammerIcon,
AppIcon,
DevPlusIcon,
PrivacyIcon,
DownloadIcon,
} from '../icons';
import { NavDrawer } from '../drawers/NavDrawer';
import {
docs,
feedback,
managePlusUrl,
plusUrl,
privacyPolicy,
termsOfService,
} from '../../lib/constants';
import { docs, feedback, managePlusUrl, plusUrl } from '../../lib/constants';
import { useLazyModal } from '../../hooks/useLazyModal';
import { LazyModal } from '../modals/common/types';
import { anchorDefaultRel } from '../../lib/strings';
Expand All @@ -48,7 +40,7 @@ import { useInstallPWA } from '../onboarding/PWA/useInstallPWA';

const useMenuItems = (): NavItemProps[] => {
const { promptToInstall, isAvailable } = useInstallPWA();
const { logout, isAndroidApp, isGdprCovered } = useAuthContext();
const { logout, isAndroidApp } = useAuthContext();
const { value: androidPWAExperiment } = useConditionalFeature({
feature: featureAndroidPWA,
shouldEvaluate:
Expand Down Expand Up @@ -119,21 +111,14 @@ const useMenuItems = (): NavItemProps[] => {
});
}

items.push(
return [
{
label: 'Invite friends',
icon: <AddUserIcon />,
href: '/account/invite',
},
{ label: 'Devcard', icon: <DevCardIcon />, href: '/devcard' },
);

if (isGdprCovered) {
items.push({ label: 'Privacy', icon: <PrivacyIcon />, href: '/privacy' });
}

return [
...items,
{ label: 'Privacy', icon: <PrivacyIcon />, href: '/account/privacy' },
{
label: 'Logout',
icon: <ExitIcon />,
Expand Down Expand Up @@ -198,24 +183,9 @@ const useMenuItems = (): NavItemProps[] => {
target: '_blank',
rel: anchorDefaultRel,
},
{
label: 'Privacy policy',
icon: <DocsIcon />,
href: privacyPolicy,
target: '_blank',
rel: anchorDefaultRel,
},
{
label: 'Terms of service',
icon: <HammerIcon />,
href: termsOfService,
target: '_blank',
rel: anchorDefaultRel,
},
].filter(Boolean);
}, [
isPlus,
isGdprCovered,
logSubscriptionEvent,
onLogout,
openModal,
Expand Down

0 comments on commit 48bb991

Please sign in to comment.