Skip to content

Commit

Permalink
fix: do not obscure view with terms on a11y statement page
Browse files Browse the repository at this point in the history
  • Loading branch information
sirtawast committed Aug 23, 2023
1 parent 8ca325a commit 91e8acd
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 91e8acd

Please sign in to comment.