Skip to content

Commit

Permalink
fix get apps link for studio on mobile (#98281)
Browse files Browse the repository at this point in the history
  • Loading branch information
bcotrim authored Jan 14, 2025
1 parent 167ecbd commit 82bd8a4
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 14 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { recordTracksEvent } from '@automattic/calypso-analytics';
import { localizeUrl } from '@automattic/i18n-utils';
import { useTranslate } from 'i18n-calypso';
import { useTranslate, Substitution } from 'i18n-calypso';
import Apple from 'calypso/assets/images/icons/apple-logo.svg';
import DesktopAppLogo from 'calypso/assets/images/icons/desktop-app-logo.svg';
import Linux from 'calypso/assets/images/icons/linux-logo.svg';
Expand Down Expand Up @@ -34,6 +34,7 @@ export interface DesktopAppConfig {
logoName: string;
title: string;
subtitle: string;
link: Substitution;
platforms: Partial< Record< PlatformType, PlatformConfig > >;
isPrimary?: boolean;
}
Expand Down Expand Up @@ -103,6 +104,11 @@ export const createWordPressDesktopConfig = (
subtitle: translate(
'The full WordPress.com experience packaged as an app for your laptop or desktop.'
),
link: translate( 'Visit {{a}}desktop.wordpress.com{{/a}} on your desktop.', {
components: {
a: <a href="https://desktop.wordpress.com" />,
},
} ),
platforms: {
[ PlatformType.MacIntel ]: {
...platformConfigs[ PlatformType.MacIntel ],
Expand Down Expand Up @@ -144,6 +150,11 @@ export const createWordPressStudioConfig = (
logoName: 'studio-app-logo',
title: translate( 'Studio by WordPress.com' ),
subtitle: translate( 'A fast, free way to develop locally with WordPress.' ),
link: translate( 'Visit {{a}}developer.wordpress.com/studio{{/a}} on your desktop.', {
components: {
a: <a href="https://developer.wordpress.com/studio/" />,
},
} ),
isPrimary: true,
platforms: {
[ PlatformType.MacIntel ]: {
Expand Down
10 changes: 1 addition & 9 deletions client/blocks/get-apps/desktop-download-options.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,7 @@ export const DesktopDownloadOptions: React.FC< Props > = ( {
const translate = useTranslate();

if ( isMobile ) {
return (
<div className="get-apps__desktop-link">
{ translate( 'Visit {{a}}desktop.wordpress.com{{/a}} on your desktop.', {
components: {
a: <a href="https://desktop.wordpress.com" />,
},
} ) }
</div>
);
return <div className="get-apps__desktop-link">{ appConfig.link }</div>;
}

return (
Expand Down
4 changes: 0 additions & 4 deletions client/blocks/get-apps/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,6 @@ main.get-apps {
}

.get-apps__desktop-link {
display: flex;
flex-direction: row;
align-items: center;
gap: 3px;
font-size: $font-body-extra-small;
}

Expand Down

0 comments on commit 82bd8a4

Please sign in to comment.