Skip to content

Commit

Permalink
Merge pull request #2119 from anth-volk/feat/2118-charityinfo
Browse files Browse the repository at this point in the history
Add UK charity data to UK site
  • Loading branch information
anth-volk authored Oct 21, 2024
2 parents df3b831 + cc841fb commit 44381c9
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions src/layout/Footer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {
import { createElement } from "react";
import useCountryId from "../hooks/useCountryId";
import { Link } from "react-router-dom";
import { defaultYear } from "../data/constants";

export default function Footer() {
const displayCategory = useDisplayCategory();
Expand Down Expand Up @@ -220,6 +221,45 @@ export function SocialLink({ icon, url, backgroundColor, color }) {
);
}

export function CharityInfo() {
const countryId = useCountryId();

return (
<div
style={{
display: "flex",
flexDirection: "column",
alignItems: "flex-start",
}}
>
{countryId === "uk" && (
<p
style={{
color: style.colors.WHITE,
fontSize: "12px",
textAlign: "left",
margin: 0,
}}
>
PolicyEngine is a registered charity with the Charity Commission of
England and Wales (no. 1210532) and as a private company limited by
guarantee with Companies House (no. 15023806).
</p>
)}
<p
style={{
color: style.colors.WHITE,
fontSize: "12px",
textAlign: "left",
margin: 0,
}}
>
{${defaultYear} PolicyEngine. All rights reserved.`}
</p>
</div>
);
}

function MobileFooter() {
return (
<div
Expand All @@ -233,6 +273,7 @@ function MobileFooter() {
<LinkSection />
<SubscribeToPolicyEngine displaySize="mobile" />
<SocialLinks />
<CharityInfo />
</div>
);
}
Expand All @@ -256,6 +297,7 @@ function TabletFooter() {
<SubscribeToPolicyEngine displaySize="mobile" />
</div>
<SocialLinks />
<CharityInfo />
</div>
);
}
Expand Down Expand Up @@ -289,6 +331,7 @@ function DesktopFooter() {
<SubscribeToPolicyEngine displaySize="mobile" />
</div>
</div>
<CharityInfo />
</div>
);
}

0 comments on commit 44381c9

Please sign in to comment.