--- import type { PrivacyPolicyResponse } from '@utils/fetch-privacy-policy'; import { formatDate, timeAgo } from '@utils/dates-n-stuff'; import FontAwesome from "@components/form/FontAwesome.svelte" interface Props { privacyData: PrivacyPolicyResponse; } const { privacyData } = Astro.props; const priv = privacyData.parameters; const getIconName = (clasification: string) => { if (clasification === 'good') return 'faceGood'; if (clasification === 'neutral') return 'faceMeh'; if (clasification === 'bad') return 'faceBad'; return ''; } // If two or more objects in privacyPolicy.points have the same title, remove the duplicates const removeDuplicates = () => { const seen = new Set(); return priv.points = priv.points.filter((point) => { if (seen.has(point.title)) { return false; } seen.add(point.title); return true; }); } --- {priv && (
{(priv.points && priv.points.length) > 0 && (

Privacy Policy Summary

)}
{ priv.rating && (

Score

{priv.rating}

)} {priv.documents && priv.documents.length > 0 && (

Documents

)} {priv.urls && priv.urls.length > 1 && (

Domains Covered by Policy

)} {priv.points && priv.points.length > 0 && (

About the Data

This data is kindly provided by tosdr.org. Read full report at: #{priv.id}

)}
)}