Dashboard: licznik dni przy tytule Nastepny trening, data zostaje w gornym prawym rogu
This commit is contained in:
@@ -481,21 +481,27 @@ export default function Dashboard() {
|
||||
<SectionHeader title="Następny trening" />
|
||||
{data.nextTraining && (
|
||||
<span className="text-dim text-[0.8125rem]">
|
||||
{`${new Date(data.nextTraining.date).toLocaleDateString('pl-PL', {
|
||||
weekday: 'long',
|
||||
day: 'numeric',
|
||||
month: 'long',
|
||||
})} · ${daysCountdown(daysFromToday(data.nextTraining.date))}`}
|
||||
{daysCountdown(daysFromToday(data.nextTraining.date))}
|
||||
</span>
|
||||
)}
|
||||
</div>
|
||||
{!data.nextTraining && !data.activePlan && (
|
||||
<Link
|
||||
to="/plans/new"
|
||||
className="text-[0.8125rem] font-bold text-accent-text hover:underline"
|
||||
>
|
||||
Utwórz plan
|
||||
</Link>
|
||||
{data.nextTraining ? (
|
||||
<span className="text-dim text-[0.8125rem]">
|
||||
{new Date(data.nextTraining.date).toLocaleDateString('pl-PL', {
|
||||
weekday: 'long',
|
||||
day: 'numeric',
|
||||
month: 'long',
|
||||
})}
|
||||
</span>
|
||||
) : (
|
||||
!data.activePlan && (
|
||||
<Link
|
||||
to="/plans/new"
|
||||
className="text-[0.8125rem] font-bold text-accent-text hover:underline"
|
||||
>
|
||||
Utwórz plan
|
||||
</Link>
|
||||
)
|
||||
)}
|
||||
</div>
|
||||
{data.nextTraining ? (
|
||||
|
||||
Reference in New Issue
Block a user