Track HiveGrid Cloud planning reference
This commit is contained in:
1 parent
b3d5ea6764
commit
e341c5938a
5784 files changed
+1104929
-3
No files matched your search
@@ -0,0 +1,22 @@
|
||||
import { LoaderFunctionArgs, MetaFunction, useLoaderData } from "react-router";
|
||||
import Page404 from "~/components/pages/Page404";
|
||||
import { getTranslations } from "~/locale/i18next.server";
|
||||
|
||||
export const loader = async ({ request }: LoaderFunctionArgs) => {
|
||||
const { t } = await getTranslations(request, "errors");
|
||||
return Response.json({
|
||||
title: `${t("notFound")} | ${process.env.APP_NAME}`,
|
||||
eyebrow: t("404.eyebrow"),
|
||||
pageTitle: t("404.title"),
|
||||
description: t("404.description"),
|
||||
});
|
||||
};
|
||||
|
||||
type Route404Data = { title: string; eyebrow: string; pageTitle: string; description: string };
|
||||
|
||||
export const meta: MetaFunction<typeof loader> = ({ data }) => [{ title: (data as Route404Data | undefined)?.title }];
|
||||
|
||||
export default function Route404() {
|
||||
const data = useLoaderData() as Route404Data | undefined;
|
||||
return <Page404 eyebrow={data?.eyebrow} title={data?.pageTitle} description={data?.description} />;
|
||||
}
|
||||
Reference in new issue
Block a user