diff --git a/app/features/front-page/routes/index.tsx b/app/features/front-page/routes/index.tsx index f8f06854e..dd88eb501 100644 --- a/app/features/front-page/routes/index.tsx +++ b/app/features/front-page/routes/index.tsx @@ -109,6 +109,7 @@ function SeasonBanner() { const { t, i18n } = useTranslation(["front"]); const season = nextSeason(new Date()) ?? currentOrPreviousSeason(new Date())!; const _previousSeason = previousSeason(new Date()); + const isMounted = useIsMounted(); const isInFuture = new Date() < season.starts; const isShowingPreviousSeason = _previousSeason?.nth === season.nth; @@ -121,17 +122,21 @@ function SeasonBanner() {
{t("front:sq.season", { nth: season.nth })}
-
- {season.starts.toLocaleDateString(i18n.language, { - month: "long", - day: "numeric", - })}{" "} - -{" "} - {season.ends.toLocaleDateString(i18n.language, { - month: "long", - day: "numeric", - })} -
+ {isMounted ? ( +
+ {season.starts.toLocaleDateString(i18n.language, { + month: "long", + day: "numeric", + })}{" "} + -{" "} + {season.ends.toLocaleDateString(i18n.language, { + month: "long", + day: "numeric", + })} +
+ ) : ( +
X
+ )}