Skip to content

Commit

Permalink
Update labels
Browse files Browse the repository at this point in the history
  • Loading branch information
eoigal committed Jan 17, 2025
1 parent 0ccb328 commit db1e8ee
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
11 changes: 8 additions & 3 deletions client/me/account/main.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ import {
import { isFetchingUserSettings } from 'calypso/state/user-settings/selectors';
import { saveUnsavedUserSettings } from 'calypso/state/user-settings/thunks';
import AccountSettingsCloseLink from './close-link';
import ToggleSitesAsLandingPage from './toggle-sites-as-landing-page';
import ToggleLandingPageSettings from './toggle-landing-page';
import ToggleUseCommunityTranslator from './toggle-use-community-translator';

import './style.scss';
Expand Down Expand Up @@ -957,9 +957,14 @@ class Account extends Component {

<FormFieldset className="account__settings-admin-home">
<FormLabel id="account__default_landing_page">
{ translate( 'Admin home' ) }
{ translate( 'Default screen' ) }
</FormLabel>
<ToggleSitesAsLandingPage />
<ToggleLandingPageSettings />
<FormSettingExplanation>
{ translate(
'When you type https://www.wordpress.com in your browser, this is the page you land on.'
) }
</FormSettingExplanation>
</FormFieldset>

<FormFieldset>
Expand Down
9 changes: 4 additions & 5 deletions client/me/account/toggle-landing-page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ function ToggleLandingPageSettings() {
return 'default';
};

async function handlePreferenceChange( selectedOption ) {
async function handlePreferenceChange( selectedOption: string ) {
const preference = { landingPage: selectedOption, updatedAt: Date.now() };
const preferenceKey =
selectedOption === 'my-sites' ? 'sites-landing-page' : 'reader-landing-page';
Expand All @@ -50,12 +50,11 @@ function ToggleLandingPageSettings() {
return (
<div>
<RadioControl
label={ translate( 'Choose your default landing page:' ) }
selected={ getSelectedOption() }
options={ [
{ label: translate( 'Default site home page' ), value: 'default' },
{ label: translate( 'My sites page' ), value: 'my-sites' },
{ label: translate( 'Reader page' ), value: 'reader' },
{ label: translate( 'My primary site' ), value: 'default' },
{ label: translate( 'All sites' ), value: 'my-sites' },
{ label: translate( 'The reader' ), value: 'reader' },
] }
onChange={ handlePreferenceChange }
disabled={ isSaving }
Expand Down

0 comments on commit db1e8ee

Please sign in to comment.