Dashboard: licznik dni obok naglowka Nastepny trening, CTA pod cwiczeniami po prawej
This commit is contained in:
@@ -477,9 +477,9 @@ export default function Dashboard() {
|
||||
{/* Następny trening */}
|
||||
<Card>
|
||||
<div className="mb-1.5 flex flex-wrap items-baseline justify-between gap-2">
|
||||
<SectionHeader title="Następny trening" />
|
||||
{data.nextTraining ? (
|
||||
<div className="flex flex-wrap items-center gap-x-3 gap-y-1">
|
||||
<div className="flex min-w-0 flex-wrap items-baseline gap-x-3">
|
||||
<SectionHeader title="Następny trening" />
|
||||
{data.nextTraining && (
|
||||
<span className="text-dim text-[0.8125rem]">
|
||||
{`${new Date(data.nextTraining.date).toLocaleDateString('pl-PL', {
|
||||
weekday: 'long',
|
||||
@@ -487,24 +487,15 @@ export default function Dashboard() {
|
||||
month: 'long',
|
||||
})} · ${daysCountdown(daysFromToday(data.nextTraining.date))}`}
|
||||
</span>
|
||||
<Link to={`/day/${data.nextTraining.dayId}`} className="shrink-0">
|
||||
<Button variant="secondary">
|
||||
<Play className="h-4 w-4" />
|
||||
{active?.dayId === data.nextTraining.dayId
|
||||
? 'Wróć do treningu'
|
||||
: 'Wykonaj trening'}
|
||||
</Button>
|
||||
</Link>
|
||||
</div>
|
||||
) : (
|
||||
!data.activePlan && (
|
||||
<Link
|
||||
to="/plans/new"
|
||||
className="text-[0.8125rem] font-bold text-accent-text hover:underline"
|
||||
>
|
||||
Utwórz plan
|
||||
</Link>
|
||||
)
|
||||
)}
|
||||
</div>
|
||||
{!data.nextTraining && !data.activePlan && (
|
||||
<Link
|
||||
to="/plans/new"
|
||||
className="text-[0.8125rem] font-bold text-accent-text hover:underline"
|
||||
>
|
||||
Utwórz plan
|
||||
</Link>
|
||||
)}
|
||||
</div>
|
||||
{data.nextTraining ? (
|
||||
@@ -522,6 +513,16 @@ export default function Dashboard() {
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
<div className="mt-4 flex justify-end">
|
||||
<Link to={`/day/${data.nextTraining.dayId}`}>
|
||||
<Button variant="secondary">
|
||||
<Play className="h-4 w-4" />
|
||||
{active?.dayId === data.nextTraining.dayId
|
||||
? 'Wróć do treningu'
|
||||
: 'Wykonaj trening'}
|
||||
</Button>
|
||||
</Link>
|
||||
</div>
|
||||
</>
|
||||
) : (
|
||||
<EmptyState
|
||||
|
||||
Reference in New Issue
Block a user