Skip to content

Commit

Permalink
chore: overwrite privacy policy modal link for PlanX privacy
Browse files Browse the repository at this point in the history
- Catch when a service has a privacy policy
- In these cases add a link to the PlanX privacy policy to be opened in a new tab
- Avoid rendering privacy page with Feedback fish content
  • Loading branch information
Mike-Heneghan committed Feb 12, 2024
1 parent 970c9fb commit 0fa2565
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
3 changes: 3 additions & 0 deletions editor.planx.uk/src/components/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ function FooterItem(props: {
href?: string;
onClick?: () => void;
bold?: boolean;
newTab?: boolean;
}) {
const title = (
<Typography
Expand All @@ -160,6 +161,8 @@ function FooterItem(props: {
component={ReactNaviLink}
href={props.href}
prefetch={false}
target={props.newTab ? "_blank" : ""}
rel={props.newTab ? "noopener" : ""}
>
{title}
</Link>
Expand Down
7 changes: 7 additions & 0 deletions editor.planx.uk/src/pages/layout/PublicLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,13 @@ const PublicFooter: React.FC = () => {
const setting = flowSettings?.elements && flowSettings?.elements[key];

if (setting?.show) {
if (key == "privacy") {
return {
title: setting.heading,
href: "https://www.planx.uk/privacy",
newTab: true,
};
}
return {
title: setting.heading,
href: makeHref(key),
Expand Down

0 comments on commit 0fa2565

Please sign in to comment.