const filters = useSearch({ from: ''/weather" })const filters = useSearch({ from: '/_dashboardLayout/weather' })const dashboardLayoutRoute = createRoute({
getParentRoute: () => rootRoute,
id: '_dashboardLayout',
component: () => {
return (
<AppLayout
siteMenu={<SiteMenu />}
userMenu={<UserMenu />}
menuItems={getCustomerMenuItems()}
menuItemsPostAdornments={(drawerOpen) => (
<>
<HelpCentreMenuItem drawerOpen={drawerOpen} />
<FeedbackMenuItem drawerOpen={drawerOpen} />
</>
)}>
<Outlet />
<SpeedDialComponent />
</AppLayout>
)
}
})
const indexRoute = createRoute({
getParentRoute: () => dashboardLayoutRoute,
path: PageRoutes.DASHBOARD,
component: DashboardPage,
validateSearch: (search: Record<string, unknown>): FiltersStore => {
return {
dateFrom: search.dateFrom
? new Date(String(search.dateFrom))
: add(extractDateWithoutTime(new Date()), { months: -1 }),
dateTo: search.dateTo
? new Date(String(search.dateTo))
: add(new Date(), { hours: 1 }),
selectedDeviceIds: search.selectedDeviceIds
? (search.selectedDeviceIds as number[])
: undefined,
showTrafficLights:
localStorage.getItem(TRAFFIC_LIGHT_SETTING) === null
? true
: localStorage.getItem(TRAFFIC_LIGHT_SETTING) === 'true'
}
}
})
const routeTree = rootRoute.addChildren([
indexRoute,
])

https://x.com/powersync_/status/2010721010006552775?s=20
dry-scarlet · 2mo ago
You can now submit your website/app/project to http://TanStack.com 's new showcase and have it seen by the TanStack community! - Global showcase browser - Per-library filters - Category filters Submit here: https://tanstack.com/showcase/submit View all here: https://tanstack.com/showcase
dry-scarlet · 3mo ago
TanStack AI Alpha 2 is here! 🖼️ Image, video, audio, speech, transcription, structured output 📦 Split adapters = smaller bundles, faster dev/contributions, easier 🎄 Fully tree shakable adapters ✨ Cleaner, flattened, fully type-safe APIs https://tanstack.com/blog/tanstack-ai-alpha-2
dry-scarlet · 3mo ago