Fix tournament page time formatting in 24h mode
Some checks are pending
E2E Tests / e2e (push) Waiting to run
Tests and checks on push / run-checks-and-tests (push) Waiting to run
Updates translation progress / update-translation-progress-issue (push) Waiting to run

Closes #2773
This commit is contained in:
Kalle
2026-02-20 18:29:18 +02:00
parent 713ddc1678
commit 1f6eaef895
2 changed files with 3 additions and 5 deletions

View File

@@ -27,7 +27,7 @@ export default function TimePopover({
className?: string;
footerText?: string;
}) {
const { formatDateTime, formatTime } = useTimeFormat();
const { formatDateTimeSmartMinutes, formatTime } = useTimeFormat();
const [open, setOpen] = useState(false);
@@ -61,7 +61,7 @@ export default function TimePopover({
setOpen(true);
}}
>
{formatDateTime(time, options)}
{formatDateTimeSmartMinutes(time, options)}
</button>
<Popover
isOpen={open}

View File

@@ -73,8 +73,6 @@ export default function TournamentRegisterPage() {
const isMounted = useIsMounted();
const tournament = useTournament();
const startsAtEvenHour = tournament.ctx.startTime.getMinutes() === 0;
return (
<div className={clsx("stack lg", containerClassName("normal"))}>
<div className="tournament__logo-container">
@@ -120,7 +118,7 @@ export default function TournamentRegisterPage() {
<TimePopover
time={tournament.ctx.startTime}
options={{
minute: startsAtEvenHour ? undefined : "numeric",
minute: "numeric",
hour: "numeric",
day: "numeric",
month: "long",