Skip to content

Commit

Permalink
Add router to SpeziProvider
Browse files Browse the repository at this point in the history
  • Loading branch information
arkadiuszbachorski committed Jan 14, 2025
1 parent 8e617bd commit d08c897
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions routes/~__root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,22 @@

import { Toaster } from '@stanfordspezi/spezi-web-design-system/components/Toaster'
import { SpeziProvider } from '@stanfordspezi/spezi-web-design-system/SpeziProvider'
import { createRootRoute, Outlet, redirect } from '@tanstack/react-router'
import { createRootRoute, Link, Outlet, redirect } from '@tanstack/react-router'
import { type ComponentProps } from 'react'
import { Helmet } from 'react-helmet'
import { auth } from '@/modules/firebase/app'
import { AuthProvider } from '@/modules/firebase/AuthProvider'
import { ReactQueryClientProvider } from '@/modules/query/ReactQueryClientProvider'
import { routes } from '@/modules/routes'
import '../modules/globals.css'

const routerProps: ComponentProps<typeof SpeziProvider>['router'] = {
Link: ({ href, ...props }) => <Link to={href} {...props} />,
}

Check warning on line 22 in routes/~__root.tsx

View check run for this annotation

Codecov / codecov/patch

routes/~__root.tsx#L20-L22

Added lines #L20 - L22 were not covered by tests

const Root = () => (
<AuthProvider>
<SpeziProvider>
<SpeziProvider router={routerProps}>

Check warning on line 26 in routes/~__root.tsx

View check run for this annotation

Codecov / codecov/patch

routes/~__root.tsx#L26

Added line #L26 was not covered by tests
<ReactQueryClientProvider>
<Helmet defaultTitle="ENGAGE-HF" titleTemplate="%s - ENGAGE-HF" />
<Outlet />
Expand Down

0 comments on commit d08c897

Please sign in to comment.