Dashboard: powitanie dostosowane do pory dnia - wieczor i w nocy

This commit is contained in:
tisachi
2026-10-17 06:10:52 +02:00
parent ffce9c3afa
commit 12b7e6cdb7

View File

@@ -332,7 +332,13 @@ export default function Dashboard() {
if (!data) return null;
const now = new Date();
const greeting = now.getHours() >= 18 ? 'Dobry wieczór' : 'Dzień dobry';
const hour = now.getHours();
const greeting =
hour >= 22 || hour < 6
? 'Dobrej nocy'
: hour >= 18
? 'Dobry wieczór'
: 'Dzień dobry';
const dateLine = now.toLocaleDateString('pl-PL', {
weekday: 'long',
day: 'numeric',