mirror of
https://github.com/TheRealOwenRees/echecsfrance.git
synced 2026-07-23 12:36:57 +00:00
Update packages (and fix intl)
This commit is contained in:
@@ -10,7 +10,7 @@ import "leaflet/dist/leaflet.css";
|
|||||||
import { useFormContext, useWatch } from "react-hook-form";
|
import { useFormContext, useWatch } from "react-hook-form";
|
||||||
import { MapContainer, Marker, TileLayer } from "react-leaflet";
|
import { MapContainer, Marker, TileLayer } from "react-leaflet";
|
||||||
|
|
||||||
import MapEvents from "@/app/[lang]/components/MapEvents";
|
import MapEvents from "@/app/[locale]/components/MapEvents";
|
||||||
import { mapBoundsAtom } from "@/app/atoms";
|
import { mapBoundsAtom } from "@/app/atoms";
|
||||||
|
|
||||||
const center: LatLngLiteral = { lat: 47.0844, lng: 2.3964 };
|
const center: LatLngLiteral = { lat: 47.0844, lng: 2.3964 };
|
||||||
+8
-8
@@ -8,14 +8,14 @@ import dynamic from "next/dynamic";
|
|||||||
import { FormProvider, useForm } from "react-hook-form";
|
import { FormProvider, useForm } from "react-hook-form";
|
||||||
import { z } from "zod";
|
import { z } from "zod";
|
||||||
|
|
||||||
import { clearMessage } from "@/app/[lang]/components/InfoMessage";
|
import { clearMessage } from "@/app/[locale]/components/InfoMessage";
|
||||||
import InfoMessage from "@/app/[lang]/components/InfoMessage";
|
import InfoMessage from "@/app/[locale]/components/InfoMessage";
|
||||||
import LoadingMap from "@/app/[lang]/components/LoadingMap";
|
import LoadingMap from "@/app/[locale]/components/LoadingMap";
|
||||||
import { DateField } from "@/app/[lang]/components/form/DateField";
|
import { DateField } from "@/app/[locale]/components/form/DateField";
|
||||||
import { SelectField } from "@/app/[lang]/components/form/SelectField";
|
import { SelectField } from "@/app/[locale]/components/form/SelectField";
|
||||||
import { SwitchField } from "@/app/[lang]/components/form/SwitchField";
|
import { SwitchField } from "@/app/[locale]/components/form/SwitchField";
|
||||||
import { TextAreaField } from "@/app/[lang]/components/form/TextAreaField";
|
import { TextAreaField } from "@/app/[locale]/components/form/TextAreaField";
|
||||||
import { TextField } from "@/app/[lang]/components/form/TextField";
|
import { TextField } from "@/app/[locale]/components/form/TextField";
|
||||||
import { addTournamentSchema } from "@/schemas";
|
import { addTournamentSchema } from "@/schemas";
|
||||||
import { TimeControl } from "@/types";
|
import { TimeControl } from "@/types";
|
||||||
import { trpc } from "@/utils/trpc";
|
import { trpc } from "@/utils/trpc";
|
||||||
@@ -2,7 +2,7 @@ import { useTranslations } from "next-intl";
|
|||||||
import Link from "next-intl/link";
|
import Link from "next-intl/link";
|
||||||
import { FaGithub, FaRegEnvelope } from "react-icons/fa";
|
import { FaGithub, FaRegEnvelope } from "react-icons/fa";
|
||||||
|
|
||||||
import ThemeSwitcher from "@/app/[lang]/components/ThemeSwitcher";
|
import ThemeSwitcher from "@/app/[locale]/components/ThemeSwitcher";
|
||||||
|
|
||||||
export default function Footer() {
|
export default function Footer() {
|
||||||
const t = useTranslations("Footer");
|
const t = useTranslations("Footer");
|
||||||
+1
-1
@@ -4,7 +4,7 @@ import { useState } from "react";
|
|||||||
|
|
||||||
import { useTranslations } from "next-intl";
|
import { useTranslations } from "next-intl";
|
||||||
|
|
||||||
import InfoMessage from "@/app/[lang]/components/InfoMessage";
|
import InfoMessage from "@/app/[locale]/components/InfoMessage";
|
||||||
import { handleEmailSubmit } from "@/handlers/formHandlers";
|
import { handleEmailSubmit } from "@/handlers/formHandlers";
|
||||||
import useContactForm from "@/hooks/useContactForm";
|
import useContactForm from "@/hooks/useContactForm";
|
||||||
|
|
||||||
@@ -37,19 +37,11 @@ export async function generateMetadata({
|
|||||||
|
|
||||||
export default async function RootLayout({
|
export default async function RootLayout({
|
||||||
children,
|
children,
|
||||||
params,
|
params: { locale },
|
||||||
}: {
|
}: {
|
||||||
children: ReactNode;
|
children: ReactNode;
|
||||||
params: { locale?: string };
|
params: { locale?: string };
|
||||||
}) {
|
}) {
|
||||||
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
||||||
const locale = useLocale(); // This hook IS allowed since it's stateless
|
|
||||||
|
|
||||||
// Show a 404 error if the user requests an unknown locale
|
|
||||||
if (params.locale !== undefined && params.locale !== locale) {
|
|
||||||
notFound();
|
|
||||||
}
|
|
||||||
|
|
||||||
let messages;
|
let messages;
|
||||||
try {
|
try {
|
||||||
messages = (await import(`@/messages/${locale}.json`)).default;
|
messages = (await import(`@/messages/${locale}.json`)).default;
|
||||||
@@ -13,7 +13,7 @@ import { FaAngleDoubleDown } from "react-icons/fa";
|
|||||||
import { LayerGroup, MapContainer, TileLayer } from "react-leaflet";
|
import { LayerGroup, MapContainer, TileLayer } from "react-leaflet";
|
||||||
import MarkerClusterGroup from "react-leaflet-cluster";
|
import MarkerClusterGroup from "react-leaflet-cluster";
|
||||||
|
|
||||||
import MapEvents from "@/app/[lang]/components/MapEvents";
|
import MapEvents from "@/app/[locale]/components/MapEvents";
|
||||||
import {
|
import {
|
||||||
debouncedHoveredListTournamentIdAtom,
|
debouncedHoveredListTournamentIdAtom,
|
||||||
filteredTournamentsByTimeControlAtom,
|
filteredTournamentsByTimeControlAtom,
|
||||||
+1
-1
@@ -3,7 +3,7 @@
|
|||||||
import { useHydrateAtoms } from "jotai/utils";
|
import { useHydrateAtoms } from "jotai/utils";
|
||||||
import dynamic from "next/dynamic";
|
import dynamic from "next/dynamic";
|
||||||
|
|
||||||
import LoadingMap from "@/app/[lang]/components/LoadingMap";
|
import LoadingMap from "@/app/[locale]/components/LoadingMap";
|
||||||
import { tournamentsAtom } from "@/app/atoms";
|
import { tournamentsAtom } from "@/app/atoms";
|
||||||
import { Tournament } from "@/types";
|
import { Tournament } from "@/types";
|
||||||
|
|
||||||
@@ -2,7 +2,7 @@ import { Dispatch, FormEvent, SetStateAction } from "react";
|
|||||||
|
|
||||||
import { useTranslations } from "next-intl";
|
import { useTranslations } from "next-intl";
|
||||||
|
|
||||||
import { clearMessage } from "@/app/[lang]/components/InfoMessage";
|
import { clearMessage } from "@/app/[locale]/components/InfoMessage";
|
||||||
import sendMail from "@/lib/sendMail";
|
import sendMail from "@/lib/sendMail";
|
||||||
import { ResponseMessage } from "@/types";
|
import { ResponseMessage } from "@/types";
|
||||||
import { errorLog } from "@/utils/logger";
|
import { errorLog } from "@/utils/logger";
|
||||||
|
|||||||
Generated
+619
-928
File diff suppressed because it is too large
Load Diff
+2
-2
@@ -35,9 +35,9 @@
|
|||||||
"lodash": "^4.17.21",
|
"lodash": "^4.17.21",
|
||||||
"mongodb": "^5.8.1",
|
"mongodb": "^5.8.1",
|
||||||
"next": "^13.4.12",
|
"next": "^13.4.12",
|
||||||
"next-intl": "^3.0.0-beta.7",
|
"next-intl": "^3.0.0-beta.16",
|
||||||
"nodemailer": "^6.9.4",
|
"nodemailer": "^6.9.4",
|
||||||
"postcss": "8.4.29",
|
"postcss": "8.4.28",
|
||||||
"react": "^18.2.0",
|
"react": "^18.2.0",
|
||||||
"react-datepicker": "^4.17.0",
|
"react-datepicker": "^4.17.0",
|
||||||
"react-dom": "^18.2.0",
|
"react-dom": "^18.2.0",
|
||||||
|
|||||||
Reference in New Issue
Block a user