2026-01-20 18:38:17 +01:00
|
|
|
import { ArrowRight } from "lucide-react";
|
|
|
|
|
import Link from "next/link";
|
|
|
|
|
import { useTranslation } from "~/providers/I18nProvider";
|
|
|
|
|
import { buildRicercaUrl } from "~/providers/RicercaProvider";
|
|
|
|
|
import { Button } from "./ui/button";
|
|
|
|
|
import { Card, CardContent, CardHeader, CardTitle } from "./ui/card";
|
|
|
|
|
|
|
|
|
|
const it = {
|
|
|
|
|
title: "Ricerche frequenti",
|
|
|
|
|
transitorio: "Transitori",
|
|
|
|
|
stabili: "Stabili",
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const en = {
|
|
|
|
|
title: "Frequent Searches",
|
|
|
|
|
transitorio: "Short-term",
|
|
|
|
|
stabili: "Stable",
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export const FrequentSearches = () => {
|
|
|
|
|
const { locale } = useTranslation();
|
|
|
|
|
const t = locale === "en" ? en : it;
|
|
|
|
|
return (
|
|
|
|
|
<Card className="mx-auto mb-4 max-w-4xl gap-4 border-0 bg-secondary shadow-none">
|
|
|
|
|
<CardHeader>
|
|
|
|
|
<CardTitle className="text-center font-bold text-3xl sm:text-2xl">
|
|
|
|
|
{t.title}
|
|
|
|
|
</CardTitle>
|
|
|
|
|
</CardHeader>
|
|
|
|
|
<CardContent className="mx-auto flex max-w-fit flex-wrap items-center justify-center gap-4 px-2 sm:px-6">
|
|
|
|
|
<Link href={buildRicercaUrl({ tipo: "Transitorio" })}>
|
|
|
|
|
<Button
|
|
|
|
|
className="flex items-center gap-1 border-2 border-transitorio bg-transitorio text-lg text-white"
|
2026-03-09 16:00:54 +01:00
|
|
|
data-umami-event="frequent_search_transitorio"
|
2026-01-20 18:38:17 +01:00
|
|
|
size="lg"
|
|
|
|
|
variant="flat"
|
|
|
|
|
>
|
|
|
|
|
{t.transitorio}
|
|
|
|
|
<ArrowRight />
|
|
|
|
|
</Button>
|
|
|
|
|
</Link>
|
|
|
|
|
<Link href={buildRicercaUrl({ tipo: "Stabile" })}>
|
|
|
|
|
<Button
|
|
|
|
|
className="flex items-center gap-1 border-2 border-stabile bg-stabile text-lg text-white"
|
2026-03-09 16:00:54 +01:00
|
|
|
data-umami-event="frequent_search_stabile"
|
2026-01-20 18:38:17 +01:00
|
|
|
size="lg"
|
|
|
|
|
variant="flat"
|
|
|
|
|
>
|
|
|
|
|
{t.stabili}
|
|
|
|
|
<ArrowRight />
|
|
|
|
|
</Button>
|
|
|
|
|
</Link>
|
|
|
|
|
<Link
|
|
|
|
|
href={buildRicercaUrl({
|
|
|
|
|
comune: "Bassano del Grappa",
|
|
|
|
|
})}
|
|
|
|
|
>
|
|
|
|
|
<Button
|
|
|
|
|
className="flex items-center gap-1 border-2 border-primary text-lg"
|
2026-03-09 16:00:54 +01:00
|
|
|
data-umami-event="frequent_search_bassano"
|
2026-01-20 18:38:17 +01:00
|
|
|
size="lg"
|
|
|
|
|
>
|
|
|
|
|
Bassano del Grappa
|
|
|
|
|
<ArrowRight />
|
|
|
|
|
</Button>
|
|
|
|
|
</Link>
|
|
|
|
|
|
|
|
|
|
<Link
|
|
|
|
|
href={buildRicercaUrl({
|
|
|
|
|
comune: "Bassano del Grappa",
|
|
|
|
|
tipo: "Transitorio",
|
|
|
|
|
})}
|
|
|
|
|
>
|
|
|
|
|
<Button
|
|
|
|
|
className="flex items-center gap-1 border-2 border-transitorio bg-transitorio text-lg text-white"
|
2026-03-09 16:00:54 +01:00
|
|
|
data-umami-event="frequent_search_bassano_transitorio"
|
2026-01-20 18:38:17 +01:00
|
|
|
size="lg"
|
|
|
|
|
variant="flat"
|
|
|
|
|
>
|
|
|
|
|
{t.transitorio} Bassano
|
|
|
|
|
<ArrowRight />
|
|
|
|
|
</Button>
|
|
|
|
|
</Link>
|
|
|
|
|
|
|
|
|
|
<Link
|
|
|
|
|
href={buildRicercaUrl({
|
|
|
|
|
comune: "Marostica",
|
|
|
|
|
})}
|
|
|
|
|
>
|
|
|
|
|
<Button
|
|
|
|
|
className="flex items-center gap-1 border-2 border-primary text-lg"
|
2026-03-09 16:00:54 +01:00
|
|
|
data-umami-event="frequent_search_marostica"
|
2026-01-20 18:38:17 +01:00
|
|
|
size="lg"
|
|
|
|
|
>
|
|
|
|
|
Marostica
|
|
|
|
|
<ArrowRight />
|
|
|
|
|
</Button>
|
|
|
|
|
</Link>
|
|
|
|
|
</CardContent>
|
|
|
|
|
</Card>
|
|
|
|
|
);
|
|
|
|
|
};
|