chore: update dependencies and add AuthProvider component
- Updated dependencies in package.json: - Incremented versions for @kevisual/api, @kevisual/context, @kevisual/router, @tanstack/react-router, @kevisual/query, @tailwindcss/vite, @tanstack/react-router-devtools, @tanstack/router-plugin, @types/node, tailwind-merge, and tailwindcss. - Added fuse.js as a new dependency. - Refactored __root.tsx to include AuthProvider for authentication context. - Created a new AuthProvider component in src/pages/auth/index.tsx.
This commit is contained in:
8
src/pages/auth/index.tsx
Normal file
8
src/pages/auth/index.tsx
Normal file
@@ -0,0 +1,8 @@
|
||||
type Props = {
|
||||
children: React.ReactNode
|
||||
}
|
||||
export const AuthProvider = ({ children }: Props) => {
|
||||
return <>
|
||||
{children}
|
||||
</>
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
import { Link, Outlet, createRootRoute, useNavigate } from '@tanstack/react-router'
|
||||
import { TanStackRouterDevtools } from '@tanstack/react-router-devtools'
|
||||
import { Toaster } from '@/components/ui/sonner'
|
||||
import { AuthProvider } from '@/pages/auth'
|
||||
export const Route = createRootRoute({
|
||||
component: RootComponent,
|
||||
})
|
||||
@@ -21,9 +22,11 @@ function RootComponent() {
|
||||
</Link>
|
||||
</div>
|
||||
<hr />
|
||||
<main className='h-[calc(100%-4rem)] overflow-auto scrollbar'>
|
||||
<Outlet />
|
||||
</main>
|
||||
<AuthProvider>
|
||||
<main className='h-[calc(100%-4rem)] overflow-auto scrollbar'>
|
||||
<Outlet />
|
||||
</main>
|
||||
</AuthProvider>
|
||||
<TanStackRouterDevtools position="bottom-right" />
|
||||
<Toaster />
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user