Skip to content

Commit

Permalink
Holiday Snow: do not display settings for P2s (#97238)
Browse files Browse the repository at this point in the history
Follow-up to #97127

Holiday Snow does not currently work on p2s, so let's not show the toggle.
  • Loading branch information
jeherve authored Dec 9, 2024
1 parent c165c65 commit 74a5d54
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion client/sites/settings/site/form.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export default function SiteSettingsForm( {
isUnlaunchedSite,
isAtomicAndEditingToolkitDeactivated,
isWpcomStagingSite,
isWPForTeamsSite,
fields,
updateFields,
onChangeField,
Expand Down Expand Up @@ -71,7 +72,7 @@ export default function SiteSettingsForm( {
urlRef="unlaunched-settings"
/>

{ ! siteIsJetpack && (
{ ! siteIsJetpack && ! isWPForTeamsSite && (
<HolidaySnow
fields={ fields }
handleToggle={ handleToggle }
Expand Down
3 changes: 3 additions & 0 deletions client/sites/settings/site/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import wrapSettingsForm from 'calypso/my-sites/site-settings/wrap-settings-form'
import { useSelector } from 'calypso/state';
import isAtomicSite from 'calypso/state/selectors/is-site-automated-transfer';
import isSiteWpcomStaging from 'calypso/state/selectors/is-site-wpcom-staging';
import isSiteWPForTeams from 'calypso/state/selectors/is-site-wpforteams';
import getIsUnlaunchedSite from 'calypso/state/selectors/is-unlaunched-site';
import { useSelectedSiteSelector } from 'calypso/state/sites/hooks';
import { getSiteOption, isJetpackSite } from 'calypso/state/sites/selectors';
Expand All @@ -26,13 +27,15 @@ export function SiteSettings( props: any ) {
const isAtomic = useSelectedSiteSelector( isAtomicSite );
const isAtomicAndEditingToolkitDeactivated = isAtomic && editingToolkitIsActive === false;
const isWpcomStagingSite = useSelectedSiteSelector( isSiteWpcomStaging );
const isWPForTeamsSite = useSelectedSiteSelector( isSiteWPForTeams );

const additionalProps = {
site,
siteIsJetpack,
isUnlaunchedSite,
isAtomicAndEditingToolkitDeactivated,
isWpcomStagingSite,
isWPForTeamsSite,
};

return (
Expand Down

0 comments on commit 74a5d54

Please sign in to comment.