Skip to content

Commit

Permalink
Merge pull request #191 from Vizzuality/SKY30-270-add-new-text-for-pr…
Browse files Browse the repository at this point in the history
…ivacy-policy-and-to-s-pages

[SKY30-270] Link ToS and privacy page links to the main website's + cleanup
  • Loading branch information
SARodrigues authored Feb 27, 2024
2 parents 0341a13 + 6051291 commit 35bd831
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 63 deletions.
15 changes: 13 additions & 2 deletions frontend/src/components/footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import Link from 'next/link';

import { Copyright } from 'lucide-react';

import { EXTERNAL_LINKS } from '@/constants/external-links';
import { PAGES } from '@/constants/pages';
import { useGetContactDetail } from '@/types/generated/contact-detail';

Expand Down Expand Up @@ -50,10 +51,20 @@ const Footer: React.FC = () => {
<Copyright className="mr-2 h-3.5 w-3.5" aria-hidden="true" /> SkyTruth {currentYear}
</div>
<nav className="flex gap-6">
<Link className="py-2" href={PAGES.privacyPolicy}>
<Link
className="py-2"
href={EXTERNAL_LINKS.privacyPolicy}
target="_blank"
rel="noopener noreferrer"
>
Privacy policy
</Link>
<Link className="py-2" href={PAGES.termsOfUse}>
<Link
className="py-2"
href={EXTERNAL_LINKS.termsOfUse}
target="_blank"
rel="noopener noreferrer"
>
Terms of use
</Link>
</nav>
Expand Down
4 changes: 4 additions & 0 deletions frontend/src/constants/external-links.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export const EXTERNAL_LINKS = {
privacyPolicy: 'https://skytruth.org/privacy-policy/',
termsOfUse: 'https://skytruth.org/terms-of-service/',
};
2 changes: 0 additions & 2 deletions frontend/src/constants/pages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,4 @@ export const PAGES = {
knowledgeHub: '/knowledge-hub',
contact: '/contact',
about: '/about',
privacyPolicy: '/privacy-policy',
termsOfUse: '/terms-of-use',
};
3 changes: 2 additions & 1 deletion frontend/src/containers/contact/form/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import {
SelectValue,
} from '@/components/ui/select';
import { Textarea } from '@/components/ui/textarea';
import { EXTERNAL_LINKS } from '@/constants/external-links';

const CATEGORY_OPTIONS = [
{
Expand Down Expand Up @@ -226,7 +227,7 @@ const ContactUsForm = (): JSX.Element => {
By submitting this form you agree with processing your personal data in
accordance with the{' '}
<Link
href="/privacy-policy"
href={EXTERNAL_LINKS.privacyPolicy}
className="underline"
target="_blank"
rel="noopener noreferrer"
Expand Down
File renamed without changes.
File renamed without changes.
29 changes: 0 additions & 29 deletions frontend/src/pages/privacy-policy.tsx

This file was deleted.

29 changes: 0 additions & 29 deletions frontend/src/pages/terms-of-use.tsx

This file was deleted.

0 comments on commit 35bd831

Please sign in to comment.