fix: convert Map to Record for server-client boundary, remove dead currentUser prop

- WeatherBoard: change previousEntries type from Map<string, PreviousEntry> to Record<string, PreviousEntry> and update lookup from .get() to bracket notation
- page.tsx: wrap previousEntries with Object.fromEntries() before passing as prop, remove unused currentUser prop
- WeatherCard: remove spurious eslint-disable-next-line comment for non-existent rule react-hooks/set-state-in-effect

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-24 17:12:46 +01:00
parent 3e869bf8ad
commit 51bc187374
3 changed files with 3 additions and 14 deletions

View File

@@ -93,11 +93,6 @@ export default async function WeatherSessionPage({ params }: WeatherSessionPageP
<WeatherBoard
sessionId={session.id}
currentUserId={authSession.user.id}
currentUser={{
id: authSession.user.id,
name: authSession.user.name ?? null,
email: authSession.user.email ?? '',
}}
entries={session.entries}
shares={session.shares}
owner={{
@@ -106,7 +101,7 @@ export default async function WeatherSessionPage({ params }: WeatherSessionPageP
email: session.user.email ?? '',
}}
canEdit={session.canEdit}
previousEntries={previousEntries}
previousEntries={Object.fromEntries(previousEntries)}
/>
</WeatherLiveWrapper>
</main>