ui(topbar): move greeting from Home body to TopBar center
All checks were successful
Deploy / deploy (push) Successful in 2m43s
All checks were successful
Deploy / deploy (push) Successful in 2m43s
The big Доброе утро line on Home ate one row for marginal value. Moved it into TopBar as a center column via 3-col grid (1fr auto 1fr), so it appears on all tabs and leaves the Home body denser.
This commit is contained in:
14
app/page.tsx
14
app/page.tsx
@@ -368,7 +368,6 @@ function HomeTab({ weather, sensors }: { weather: WeatherData | null; sensors: S
|
||||
const [todayEvents, setTodayEvents] = useState<CalendarEvent[]>([])
|
||||
const [tomorrowEvents, setTomorrowEvents] = useState<CalendarEvent[]>([])
|
||||
const [calLoading, setCalLoading] = useState(true)
|
||||
const [greeting, setGreeting] = useState(getGreeting())
|
||||
const [pinnedNotes, setPinnedNotes] = useState<any[]>([])
|
||||
const [selectedDay, setSelectedDay] = useState<any>(null)
|
||||
|
||||
@@ -411,11 +410,6 @@ function HomeTab({ weather, sensors }: { weather: WeatherData | null; sensors: S
|
||||
.catch(() => {})
|
||||
}, [])
|
||||
|
||||
useEffect(() => {
|
||||
const t = setInterval(() => setGreeting(getGreeting()), 60000)
|
||||
return () => clearInterval(t)
|
||||
}, [])
|
||||
|
||||
|
||||
|
||||
return (
|
||||
@@ -424,14 +418,6 @@ function HomeTab({ weather, sensors }: { weather: WeatherData | null; sensors: S
|
||||
padding: '18px 22px 24px',
|
||||
display: 'flex', flexDirection: 'column', gap: 14,
|
||||
}}>
|
||||
{/* ───── Greeting ───── */}
|
||||
<h1 style={{
|
||||
fontSize: 28, fontWeight: 800, color: 'var(--text-primary)',
|
||||
letterSpacing: '-0.6px', margin: 0, lineHeight: 1.1,
|
||||
}}>
|
||||
{greeting} <span style={{ fontSize: 26 }}>👋</span>
|
||||
</h1>
|
||||
|
||||
{/* ───── Bento row: Hero weather + Tram ───── */}
|
||||
<div style={{ display: 'grid', gridTemplateColumns: '1fr 1.1fr', gap: 14, minHeight: 230 }}>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user