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:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user