App: przycisk Wstecz w tresni strony dnia prowadzi do planu dnia - BackButton w PageHeader DayExecution = /plans/{planId} (md+; na telefonie zostaje < w topbarze), fallback /calendar gdy dzien bez planu (mock GET /days/:id z planId; unit)

This commit is contained in:
tisachi
2026-11-06 01:10:42 +01:00
parent 6f1028b649
commit 0569eb36f1
2 changed files with 30 additions and 1 deletions

View File

@@ -48,6 +48,7 @@ import { useTopbar } from '../topbar';
import StartTrainingPresenceModal from '../components/presence/StartTrainingPresenceModal';
import {
Badge,
BackButton,
Button,
Card,
ConfirmDialog,
@@ -1156,7 +1157,13 @@ export default function DayExecution() {
return (
<>
<PageHeader title={title} />
{/* md+: powrót do planu, do którego należy dzień (na telefonie „<” w topbarze) */}
<PageHeader
title={title}
actions={
dayInfo && <BackButton to={dayInfo.planId ? `/plans/${dayInfo.planId}` : '/calendar'} />
}
/>
{error && <ErrorText>{error}</ErrorText>}