Load locale ondemand + spanish locale (#249)

This commit is contained in:
Luke Vella 2022-07-28 10:39:58 +01:00 committed by GitHub
parent 0f35bd0518
commit c2aea134ef
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
30 changed files with 700 additions and 455 deletions

View file

@ -1,5 +1,6 @@
import Head from "next/head";
import Link from "next/link";
import { useTranslation } from "next-i18next";
import * as React from "react";
import { Button } from "@/components/button";
@ -19,6 +20,7 @@ const ErrorPage: React.VoidFunctionComponent<ComponentProps> = ({
title,
description,
}) => {
const { t } = useTranslation("errors");
return (
<div className="mx-auto flex h-full max-w-full items-center justify-center bg-gray-50 px-4 py-8 lg:w-[1024px]">
<Head>
@ -28,16 +30,16 @@ const ErrorPage: React.VoidFunctionComponent<ComponentProps> = ({
<div className="flex items-start">
<div className="text-center">
<Icon className="mb-4 inline-block w-24 text-slate-400" />
<div className="text-primary-500 mb-2 text-3xl font-bold ">
<div className="mb-2 text-3xl font-bold text-primary-500 ">
{title}
</div>
<p>{description}</p>
<div className="flex justify-center space-x-3">
<Link href="/" passHref={true}>
<a className="btn-default">Go to home</a>
<a className="btn-default">{t("goToHome")}</a>
</Link>
<Button icon={<Chat />} onClick={showCrispChat}>
Start chat
{t("startChat")}
</Button>
</div>
</div>