infoalloggi-monorepo/apps/infoalloggi/src/components/failed-loading.tsx
Marco Pedone edaee780d6 refactor: remove unused annunci data fetching and components; update ricerca logic
- Deleted the `annunci.ts` file which contained the database fetching logic.
- Removed the `TestAppPage` component that relied on the deleted data fetching.
- Eliminated the `AnnunciList` component that was dependent on the removed data.
- Updated `annunci_map.tsx` to handle optional `selectComune` parameter.
- Refactored `annunci_tutorial.tsx` to use `buildRicercaUrl` for navigation.
- Adjusted `annuncio_card.tsx` for consistent styling and layout changes.
- Modified `codiceRicerca.tsx` to fix z-index issue.
- Enhanced `failed-loading.tsx` and `500Auth.tsx` for responsive design.
- Updated `annunci.tsx` to include loading state for map and annunci list.
- Refined filter handling in `Filters` component to use a single `setAllParams` method.
- Introduced `FrequentSearches` component for better user navigation.
- Updated `RicercaProvider` to streamline state management and URL building.
- Adjusted server-side logic in `annunci.controller.ts` to ensure valid data.
2026-01-20 18:38:17 +01:00

43 lines
1.3 KiB
TypeScript

import Link from "next/link";
import { useRouter } from "next/router";
import { HomeIcon } from "~/components/IconComponents";
import { useTranslation } from "~/providers/I18nProvider";
import { Button } from "./ui/button";
export default function FailedAnnuncioLoading() {
const router = useRouter();
const { t } = useTranslation();
return (
<main>
<div className="mx-auto flex h-screen max-w-7xl items-center justify-start px-4 md:px-8">
<div className="mx-auto max-w-lg space-y-3 text-center">
<HomeIcon className="mx-auto size-20 text-destructive" />
<h3 className="font-semibold text-4xl text-accent-foreground sm:text-5xl">
{t.annuncio_load_fail.titolo}
</h3>
<p className="">{t.annuncio_load_fail.sottotitolo}</p>
<div className="flex flex-wrap items-center justify-center gap-3">
<Button
onClick={() => {
router.back();
}}
size="lg"
variant="destructive"
>
{t.annuncio_load_fail.CTA}
</Button>
<Link
//className="block rounded-lg border border-border px-4 py-2 font-medium duration-150"
href="/annunci"
>
<Button size="lg" variant="outline">
{t.annuncio_load_fail.home}
</Button>
</Link>
</div>
</div>
</div>
</main>
);
}