Skip to content

Commit

Permalink
Merge pull request #2187 from City-of-Helsinki/hl-890
Browse files Browse the repository at this point in the history
HL-890 | Do not obscure view with terms on a11y statement page
  • Loading branch information
sirtawast authored Aug 28, 2023
2 parents 0aa8012 + 91e8acd commit 9077729
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion frontend/benefit/applicant/src/components/layout/Layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ const Layout: React.FC<Props> = ({ children, ...rest }) => {
const router = useRouter();
const bgColor = router.pathname === ROUTES.LOGIN ? 'silverLight' : 'white';

const isAccessibilityStatement =
router.pathname === ROUTES.ACCESSIBILITY_STATEMENT;

React.useEffect(() => {
if (IS_CLIENT) {
setIsTermsOfSerivceApproved(
Expand All @@ -37,7 +40,9 @@ const Layout: React.FC<Props> = ({ children, ...rest }) => {
return (
<$Main backgroundColor={bgColor} {...rest}>
<Header />
{isAuthenticated && !isTermsOfServiceApproved ? (
{isAuthenticated &&
!isAccessibilityStatement &&
!isTermsOfServiceApproved ? (
<TermsOfService
setIsTermsOfSerivceApproved={setIsTermsOfSerivceApproved}
/>
Expand Down

0 comments on commit 9077729

Please sign in to comment.