Skip to content

Commit

Permalink
Merge pull request #2001 from tawandamoyo/fix/1849/uk-terms-of-servic…
Browse files Browse the repository at this point in the history
…e-page-says-following-us-law

Fix terms of service page to say that we follow the selected country laws. Defaults to US law if invalid country id is used
  • Loading branch information
anth-volk authored Sep 4, 2024
2 parents 8f341ba + 4f3424b commit 77fb4ac
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion src/pages/TermsAndConditions.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,26 @@ import useMobile from "../layout/Responsive";
import { Helmet } from "react-helmet";
import Header from "../layout/Header";
import Footer from "../layout/Footer";
import useCountryId from "../hooks/useCountryId";
import { COUNTRY_NAMES } from "../data/countries";

export default function TACPage() {
const mobile = useMobile();

const countryId = useCountryId();
const DEFAULT_COUNTRY = "the United Kingdom";

const getCountryName = (id) => {
const country = COUNTRY_NAMES[id];

if (country) {
return country.phrasal || country.standard;
}
return DEFAULT_COUNTRY;
};

const countryName = getCountryName(countryId);

return (
<>
<Helmet>
Expand Down Expand Up @@ -87,7 +104,7 @@ export default function TACPage() {
<h4>Governing Law</h4>
<p>
9.1 These Terms shall be governed by and construed in accordance with
the laws of the United States.
the laws of {countryName}.
</p>
<h4>Changes to the Terms</h4>
<p>
Expand Down

0 comments on commit 77fb4ac

Please sign in to comment.