Skip to content

Commit

Permalink
Only allow toggleable front sections if the user is signed in
Browse files Browse the repository at this point in the history
  • Loading branch information
abeddow91 committed Jan 16, 2025
1 parent 5c72902 commit e015978
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion dotcom-rendering/src/components/FrontSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { between, from, space, until } from '@guardian/source/foundations';
import { pageSkinContainer } from '../layouts/lib/pageSkin';
import type { EditionId } from '../lib/edition';
import { hideAge } from '../lib/hideAge';
import { useIsSignedIn } from '../lib/useAuthStatus';
import { palette, palette as schemePalette } from '../palette';
import type { CollectionBranding } from '../types/branding';
import type {
Expand Down Expand Up @@ -509,7 +510,8 @@ export const FrontSection = ({
isTagPage = false,
isScrollableContainer = false,
}: Props) => {
const isToggleable = toggleable && !!sectionId;
const isSignedIn = useIsSignedIn();
const isToggleable = isSignedIn === true && toggleable && !!sectionId;
const showMore =
canShowMore &&
!!title &&
Expand Down

0 comments on commit e015978

Please sign in to comment.