mirror of
https://github.com/TheRealOwenRees/echecsfrance.git
synced 2026-07-23 04:26:57 +00:00
Rebase changes
This commit is contained in:
Vendored
+4
-1
@@ -3,7 +3,10 @@ import * as L from "leaflet";
|
|||||||
// Use type safe message keys with `next-intl`
|
// Use type safe message keys with `next-intl`
|
||||||
type Messages = typeof import("./src/messages/fr.json");
|
type Messages = typeof import("./src/messages/fr.json");
|
||||||
|
|
||||||
declare interface IntlMessages extends Messages {}
|
declare global {
|
||||||
|
// Use type safe message keys with `next-intl`
|
||||||
|
interface IntlMessages extends Messages {}
|
||||||
|
}
|
||||||
|
|
||||||
// For some reason, @types/leaflet.markercluster isn't being recognized
|
// For some reason, @types/leaflet.markercluster isn't being recognized
|
||||||
// I'm including it here by hand
|
// I'm including it here by hand
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import { last } from "lodash";
|
|||||||
import { useTranslations } from "next-intl";
|
import { useTranslations } from "next-intl";
|
||||||
import { twMerge } from "tailwind-merge";
|
import { twMerge } from "tailwind-merge";
|
||||||
|
|
||||||
|
import { ErrorBox } from "@/components/ErrorBox";
|
||||||
import { TournamentResultsData } from "@/server/fetchTournamentResults";
|
import { TournamentResultsData } from "@/server/fetchTournamentResults";
|
||||||
import { SearchedTournament } from "@/server/searchTournaments";
|
import { SearchedTournament } from "@/server/searchTournaments";
|
||||||
import { TimeControl } from "@/types";
|
import { TimeControl } from "@/types";
|
||||||
@@ -107,7 +108,7 @@ export const TournamentResults = ({
|
|||||||
).length;
|
).length;
|
||||||
|
|
||||||
if (playerResults.estimated || playerResults.national)
|
if (playerResults.estimated || playerResults.national)
|
||||||
return <div className="my-8 text-center text-error">{t("needRating")}</div>;
|
return <ErrorBox error={t("needRating")} />;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
|||||||
@@ -217,20 +217,6 @@ export default function Elo() {
|
|||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{error instanceof Error && (
|
|
||||||
<div className="mt-8 text-center text-error">
|
|
||||||
{error.message.startsWith("ERR_")
|
|
||||||
? t(error.message as TranslationKey)
|
|
||||||
: t.rich("unknownError", {
|
|
||||||
contact: (chunks) => (
|
|
||||||
<Link className="underline" href="/contact-us">
|
|
||||||
{chunks}
|
|
||||||
</Link>
|
|
||||||
),
|
|
||||||
})}
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
|
|
||||||
{!isFetching && playerOptions.length > 0 && (
|
{!isFetching && playerOptions.length > 0 && (
|
||||||
<div>
|
<div>
|
||||||
<div className="grid w-full grid-cols-1 gap-2 sm:grid-cols-2">
|
<div className="grid w-full grid-cols-1 gap-2 sm:grid-cols-2">
|
||||||
|
|||||||
@@ -213,11 +213,7 @@
|
|||||||
"kFactorInfo3": "40 for a player new to the rating list until he has completed events with at least 30 games.",
|
"kFactorInfo3": "40 for a player new to the rating list until he has completed events with at least 30 games.",
|
||||||
"kFactorInfo4": "20 as long as a player's rating remains under 2400.",
|
"kFactorInfo4": "20 as long as a player's rating remains under 2400.",
|
||||||
"kFactorInfo5": "10 once a player's published rating has reached 2400 and remains at that level subsequently, even if the rating drops below 2400.",
|
"kFactorInfo5": "10 once a player's published rating has reached 2400 and remains at that level subsequently, even if the rating drops below 2400.",
|
||||||
"kFactorInfo6": "40 for all players until their 18th birthday, as long as their rating remains under 2300.",
|
"kFactorInfo6": "40 for all players until their 18th birthday, as long as their rating remains under 2300."
|
||||||
|
|
||||||
"unknownError": "We were unable to fetch results from this URL. Please <contact>contact us</contact> if the problem persists.",
|
|
||||||
"ERR_TOURNAMENT_NOT_FOUND": "Tournament not found",
|
|
||||||
"ERR_NO_TOURNAMENT_ID": "The link you provided is incorrect"
|
|
||||||
},
|
},
|
||||||
|
|
||||||
"Zones": {
|
"Zones": {
|
||||||
|
|||||||
@@ -214,11 +214,7 @@
|
|||||||
"kFactorInfo3": "<b>40</b> pour un joueur nouvellement inscrit au classement tant qu'il n'a pas participé à des événements avec au moins 30 parties.",
|
"kFactorInfo3": "<b>40</b> pour un joueur nouvellement inscrit au classement tant qu'il n'a pas participé à des événements avec au moins 30 parties.",
|
||||||
"kFactorInfo4": "<b>20</b> tant que le classement d'un joueur reste inférieur à 2400.",
|
"kFactorInfo4": "<b>20</b> tant que le classement d'un joueur reste inférieur à 2400.",
|
||||||
"kFactorInfo5": "<b>10</b> une fois que le classement publié d'un joueur a atteint 2400 et reste à ce niveau par la suite, même s'il redescend en dessous de 2400.",
|
"kFactorInfo5": "<b>10</b> une fois que le classement publié d'un joueur a atteint 2400 et reste à ce niveau par la suite, même s'il redescend en dessous de 2400.",
|
||||||
"kFactorInfo6": "<b>40</b> pour tous les joueurs jusqu'à leur 18e anniversaire, tant que leur classement reste inférieur à 2300.",
|
"kFactorInfo6": "<b>40</b> pour tous les joueurs jusqu'à leur 18e anniversaire, tant que leur classement reste inférieur à 2300."
|
||||||
|
|
||||||
"unknownError": "Nous n'avons pas pu récupérer les résultats à partir de cette URL. Veuillez <contact>nous contacter</contact> si le problème persiste.",
|
|
||||||
"ERR_TOURNAMENT_NOT_FOUND": "Tournoi introuvable",
|
|
||||||
"ERR_NO_TOURNAMENT_ID": "L'identifiant du tournoi fourni est incorrect"
|
|
||||||
},
|
},
|
||||||
|
|
||||||
"Zones": {
|
"Zones": {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { createSafeActionClient } from "next-safe-action";
|
import { createSafeActionClient } from "next-safe-action";
|
||||||
|
|
||||||
export const action = createSafeActionClient({
|
export const actionClient = createSafeActionClient({
|
||||||
handleReturnedServerError(error) {
|
handleServerError(error) {
|
||||||
return error.message;
|
throw error;
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user