Rebase changes

This commit is contained in:
Timothy Armes
2024-09-27 11:09:57 +02:00
parent 1c7ad63e03
commit b6c0cb43cc
6 changed files with 11 additions and 29 deletions
@@ -4,6 +4,7 @@ import { last } from "lodash";
import { useTranslations } from "next-intl";
import { twMerge } from "tailwind-merge";
import { ErrorBox } from "@/components/ErrorBox";
import { TournamentResultsData } from "@/server/fetchTournamentResults";
import { SearchedTournament } from "@/server/searchTournaments";
import { TimeControl } from "@/types";
@@ -107,7 +108,7 @@ export const TournamentResults = ({
).length;
if (playerResults.estimated || playerResults.national)
return <div className="my-8 text-center text-error">{t("needRating")}</div>;
return <ErrorBox error={t("needRating")} />;
return (
<>
-14
View File
@@ -217,20 +217,6 @@ export default function Elo() {
</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 && (
<div>
<div className="grid w-full grid-cols-1 gap-2 sm:grid-cols-2">
+1 -5
View File
@@ -213,11 +213,7 @@
"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.",
"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.",
"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"
"kFactorInfo6": "40 for all players until their 18th birthday, as long as their rating remains under 2300."
},
"Zones": {
+1 -5
View File
@@ -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.",
"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.",
"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"
"kFactorInfo6": "<b>40</b> pour tous les joueurs jusqu'à leur 18e anniversaire, tant que leur classement reste inférieur à 2300."
},
"Zones": {
+3 -3
View File
@@ -1,7 +1,7 @@
import { createSafeActionClient } from "next-safe-action";
export const action = createSafeActionClient({
handleReturnedServerError(error) {
return error.message;
export const actionClient = createSafeActionClient({
handleServerError(error) {
throw error;
},
});