mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-10-19 05:26:47 +00:00
feat(plugins): pass the dashboard's spotlight trip id to widget plugins
Widget plugins now receive the current (spotlight) trip id in their bridge context, so a widget like Trip Countdown can show a real countdown instead of the empty state.
This commit is contained in:
@@ -237,7 +237,7 @@ export default function DashboardPage(): React.ReactElement {
|
||||
{showCollections && <CollectionsWidget onOpen={() => navigate('/collections')} />}
|
||||
{showTimezones && <TimezoneTool locale={locale} />}
|
||||
{showUpcoming && <UpcomingTool items={upcoming} locale={locale} onOpen={(tripId) => navigate(`/trips/${tripId}`)} />}
|
||||
<PluginWidgets plugins={widgetPlugins} />
|
||||
<PluginWidgets plugins={widgetPlugins} tripId={spotlight ? String(spotlight.id) : null} />
|
||||
</aside>
|
||||
)}
|
||||
</main>
|
||||
|
||||
Reference in New Issue
Block a user