Skip to content

Commit

Permalink
New DB schema and Privacy policy (#51)
Browse files Browse the repository at this point in the history
* Enable static rendering for festival and home page

* Bump to Next 15 and React 19

* Update React to stable version

* Added animation to map toggle

* Animate trigger

* Fix marker animation

* Pill animation

* Update to work with new databas schema

* Added privacy policy
  • Loading branch information
Dosbodoke authored Feb 6, 2025
1 parent 292d2ac commit 1716487
Show file tree
Hide file tree
Showing 29 changed files with 1,657 additions and 1,722 deletions.
2 changes: 1 addition & 1 deletion app/[locale]/[id]/_components/HighlineHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export const HighlineHeader = ({ highline }: { highline: Highline }) => {
<div className="flex gap-2">
<RegistryEntry
highlineId={highline.id}
highlineDistance={highline.lenght}
highlineDistance={highline.length}
/>
<Button variant="outline" className="border-dashed" asChild>
{highline.anchor_a_lat && highline.anchor_b_lat ? (
Expand Down
4 changes: 1 addition & 3 deletions app/[locale]/[id]/_components/Info.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,8 @@ function Info({ highline }: Props) {
/>
<InfoItem
label={t("length")}
value={`${highline.lenght} ${t("meters")}`}
value={`${highline.length} ${t("meters")}`}
/>
<InfoItem label={t("mainWebbing")} value={highline.main_webbing} />
<InfoItem label={t("backupWebbing")} value={highline.backup_webbing} />
</div>
);
}
Expand Down
2 changes: 1 addition & 1 deletion app/[locale]/_components/Highline.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export function Highline({ highline, classname }: Props) {
</div>
<div className="flex gap-2">
<UnfoldHorizontalIcon className="h-4 w-4" />{" "}
{highline.lenght.toFixed(0)}m
{highline.length.toFixed(0)}m
</div>
</div>
</CardHeader>
Expand Down
118 changes: 0 additions & 118 deletions app/[locale]/festival/_components/timeline.tsx

This file was deleted.

66 changes: 66 additions & 0 deletions app/[locale]/privacy/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
import type { Metadata } from "next";
import { getTranslations } from "next-intl/server";

import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";

export const revalidate = 0;

export const metadata: Metadata = {
title: "Privacy Policy",
description: "Our commitment to protecting your privacy",
};

export default async function PrivacyPolicyPage() {
const t = await getTranslations("privacyPolicy");

return (
<div className="container mx-auto px-4 py-8">
<Card>
<CardHeader>
<CardTitle className="text-3xl font-bold">{t("title")}</CardTitle>
</CardHeader>
<CardContent className="prose prose-sm max-w-none">
<p>{t("intro")}</p>

<h2 className="mt-6 text-xl font-semibold">
{t("collectionUse.title")}
</h2>
<p>{t("collectionUse.p1")}</p>
<p>{t("collectionUse.p2")}</p>
<p>{t("collectionUse.p3")}</p>

<h2 className="mt-6 text-xl font-semibold">{t("cookies.title")}</h2>
<p>{t("cookies.p1")}</p>
<p>{t("cookies.p2")}</p>
<p>{t("cookies.p3")}</p>

<h2 className="mt-6 text-xl font-semibold">
{t("externalLinks.title")}
</h2>
<p>{t("externalLinks.content")}</p>

<h2 className="mt-6 text-xl font-semibold">
{t("rightOfRefusal.title")}
</h2>
<p>{t("rightOfRefusal.p1")}</p>
<p>{t("rightOfRefusal.p2")}</p>

<h2 className="mt-6 text-xl font-semibold">
{t("userCommitment.title")}
</h2>
<p>{t("userCommitment.intro")}</p>
<ul className="list-disc pl-6">
<li>{t("userCommitment.a")}</li>
<li>{t("userCommitment.b")}</li>
<li>{t("userCommitment.c")}</li>
</ul>

<h2 className="mt-6 text-xl font-semibold">{t("moreInfo.title")}</h2>
<p>{t("moreInfo.content")}</p>

<p className="mt-6 font-semibold">{t("effectiveDate")}</p>
</CardContent>
</Card>
</div>
);
}
2 changes: 1 addition & 1 deletion app/[locale]/profile/[username]/_components/LastWalks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ function LastWalksContent({ entries }: ContentProps) {
{t("popover.height")}: {entry.highline?.height}m
</p>
<p>
{t("popover.length")}: {entry.highline?.lenght}m
{t("popover.length")}: {entry.highline?.length}m
</p>
</div>
<Button className="w-full" variant={"outline"} asChild>
Expand Down
12 changes: 6 additions & 6 deletions components/CreateHighline.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ const formSchema = z.object({
invalid_type_error: "Insira um número",
})
.positive("Altura não pode ser negativa"),
lenght: z.coerce
length: z.coerce
.number({
required_error: "Insira o comprimento do Highline",
invalid_type_error: "Insira um número",
Expand Down Expand Up @@ -124,7 +124,7 @@ const CreateHighline = ({
defaultValues: {
name: "",
height: undefined,
lenght: undefined,
length: undefined,
backup_webbing: "",
main_webbing: "",
image: "",
Expand All @@ -135,7 +135,7 @@ const CreateHighline = ({
async function createHighline({
name,
height,
lenght,
length,
main_webbing,
backup_webbing,
description,
Expand Down Expand Up @@ -185,7 +185,7 @@ const CreateHighline = ({
{
name,
height,
lenght,
length,
main_webbing,
backup_webbing,
description,
Expand Down Expand Up @@ -240,7 +240,7 @@ const CreateHighline = ({
parseFloat(decoded[3]),
parseFloat(decoded[4])
);
highlineForm.setValue("lenght", getDistance({ anchorA, anchorB }));
highlineForm.setValue("length", getDistance({ anchorA, anchorB }));
} catch (e) {
if (e instanceof Error) console.error(e.message);
return;
Expand Down Expand Up @@ -330,7 +330,7 @@ const CreateHighline = ({
/>
<FormField
control={highlineForm.control}
name="lenght"
name="length"
render={({ field }) => (
<FormItem>
<FormLabel>{t("length.label")}</FormLabel>
Expand Down
2 changes: 1 addition & 1 deletion components/Map/LocationPicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export const LocationPicker = ({
const { error } = await supabase
.from("highline")
.update({
lenght: getDistance({ anchorA: data.anchorA, anchorB: data.anchorB }),
length: getDistance({ anchorA: data.anchorA, anchorB: data.anchorB }),
anchor_a: locationToPostGISPoint({
lat: data.anchorA.lat,
lng: data.anchorA.lng,
Expand Down
2 changes: 1 addition & 1 deletion components/Map/Selected.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export const Selected = ({
<div className="flex items-center pt-2">
<UnfoldHorizontalIcon className="mr-2 h-4 w-4 opacity-70" />{" "}
<span className="text-xs text-muted-foreground">
{selected.lenght}m
{selected.length}m
</span>
</div>
</div>
Expand Down
37 changes: 37 additions & 0 deletions messages/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -264,5 +264,42 @@
"festival": {
"cardSubTitle": "Follow the festival ranking in real time",
"pageSubTitle": "The biggest Highline festival in Brazil"
},
"privacyPolicy": {
"title": "Privacy Policy",
"intro": "Your privacy is important to us. It is ChooseLife's policy to respect your privacy regarding any information we may collect from you across our website, ChooseLife, and other sites we own and operate.",
"collectionUse": {
"title": "Information Collection and Use",
"p1": "We only ask for personal information when we truly need it to provide a service to you. We collect it by fair and lawful means, with your knowledge and consent. We also let you know why we're collecting it and how it will be used.",
"p2": "We only retain collected information for as long as necessary to provide you with your requested service. What data we store, we'll protect within commercially acceptable means to prevent loss and theft, as well as unauthorized access, disclosure, copying, use or modification.",
"p3": "We don't share any personally identifying information publicly or with third-parties, except when required to by law."
},
"cookies": {
"title": "Use of Cookies",
"p1": "We use cookies to improve your experience on our site. Specifically, we use cookies for authentication purposes with Supabase, our backend provider. These cookies are essential for the website's functionality and to keep you logged in during your session.",
"p2": "Authentication cookies securely store session information, allowing you to browse the site without having to log in repeatedly. They do not collect any personal information beyond what is necessary for this function.",
"p3": "You can choose to disable cookies through your browser settings. However, this may affect the functionality of the site, especially regarding authentication and staying logged in."
},
"externalLinks": {
"title": "External Links",
"content": "Our website may link to external sites that are not operated by us. Please be aware that we have no control over the content and practices of these sites, and cannot accept responsibility or liability for their respective privacy policies."
},
"rightOfRefusal": {
"title": "Your Right of Refusal",
"p1": "You are free to refuse our request for your personal information, with the understanding that we may be unable to provide you with some of your desired services.",
"p2": "Your continued use of our website will be regarded as acceptance of our practices around privacy and personal information. If you have any questions about how we handle user data and personal information, feel free to contact us."
},
"userCommitment": {
"title": "User Commitment",
"intro": "The user commits to properly use the contents and information that ChooseLife offers on the website and with enunciative, but not limiting, character:",
"a": "A) Not to engage in activities that are illegal or contrary to good faith and public order;",
"b": "B) Not to spread propaganda or content of a racist, xenophobic nature, or any type of illegal pornography, terrorist advocacy, or against human rights;",
"c": "C) Not to cause damage to the physical (hardware) and logical (software) systems of ChooseLife, its suppliers or third parties, to introduce or spread computer viruses or any other hardware or software systems that are capable of causing the aforementioned damages."
},
"moreInfo": {
"title": "More Information",
"content": "Hopefully, this has clarified things for you and as was previously mentioned if there is something that you aren't sure whether you need or not it's usually safer to leave cookies enabled in case it does interact with one of the features you use on our site."
},
"effectiveDate": "This policy is effective as of February 6, 2025."
}
}
Loading

0 comments on commit 1716487

Please sign in to comment.