refacto: error and types

This commit is contained in:
Julien Froidefond
2025-02-27 21:59:14 +01:00
parent ea51ff53a9
commit 279f6c6e88
37 changed files with 800 additions and 684 deletions

View File

@@ -5,7 +5,7 @@ import { revalidatePath } from "next/cache";
import { withPageTiming } from "@/lib/hoc/withPageTiming";
import { ErrorMessage } from "@/components/ui/ErrorMessage";
import { HomeData } from "@/lib/services/home.service";
import { ERROR_CODES } from "@/constants/errorCodes";
async function refreshHome() {
"use server";
@@ -32,7 +32,7 @@ async function HomePage() {
return (
<main className="container mx-auto px-4 py-8">
<ErrorMessage errorCode="HOME_FETCH_ERROR" />
<ErrorMessage error={error as Error} errorCode="HOME_FETCH_ERROR" />
</main>
);
}