Dashboard: przycisk 'Utworz plan' w gornym narozniku karty 'Nastepny trening' (jak 'Zobacz wszystkie')
This commit is contained in:
@@ -424,7 +424,7 @@ export default function Dashboard() {
|
||||
<Card>
|
||||
<div className="mb-1.5 flex flex-wrap items-baseline justify-between gap-2">
|
||||
<SectionHeader title="Następny trening" />
|
||||
{data.nextTraining && (
|
||||
{data.nextTraining ? (
|
||||
<span className="text-dim text-[0.8125rem]">
|
||||
{new Date(data.nextTraining.date).toLocaleDateString('pl-PL', {
|
||||
weekday: 'long',
|
||||
@@ -432,6 +432,15 @@ export default function Dashboard() {
|
||||
month: 'long',
|
||||
})}
|
||||
</span>
|
||||
) : (
|
||||
!data.activePlan && (
|
||||
<Link to="/plans/new">
|
||||
<Button size="sm">
|
||||
<Flame className="h-4 w-4" />
|
||||
Utwórz plan
|
||||
</Button>
|
||||
</Link>
|
||||
)
|
||||
)}
|
||||
</div>
|
||||
{data.nextTraining ? (
|
||||
@@ -465,16 +474,6 @@ export default function Dashboard() {
|
||||
? 'Wszystko zrobione — czekaj na kolejny dzień z planu.'
|
||||
: 'Utwórz plan, aby rozpocząć treningi.'
|
||||
}
|
||||
action={
|
||||
!data.activePlan ? (
|
||||
<Link to="/plans/new">
|
||||
<Button>
|
||||
<Flame className="h-4 w-4" />
|
||||
Utwórz plan
|
||||
</Button>
|
||||
</Link>
|
||||
) : undefined
|
||||
}
|
||||
/>
|
||||
)}
|
||||
</Card>
|
||||
|
||||
Reference in New Issue
Block a user