Refactor user management in usuarios.tsx: integrate react-query for data fetching and mutations, streamline role handling, and enhance user ban/unban functionality.
This commit is contained in:
@@ -1,12 +1,15 @@
|
||||
import { Outlet, createRootRouteWithContext } from '@tanstack/react-router'
|
||||
import type { SupabaseAuthState } from '@/auth/supabase'
|
||||
import { ThemeProvider } from '@/components/theme-provider'
|
||||
import type { QueryClient } from '@tanstack/react-query'
|
||||
|
||||
interface AuthContext {
|
||||
auth: SupabaseAuthState
|
||||
|
||||
interface Context {
|
||||
auth: SupabaseAuthState,
|
||||
queryClient: QueryClient
|
||||
}
|
||||
|
||||
export const Route = createRootRouteWithContext<AuthContext>()({
|
||||
export const Route = createRootRouteWithContext<Context>()({
|
||||
component: () => (
|
||||
<>
|
||||
<ThemeProvider defaultTheme="light" storageKey="vite-ui-theme">
|
||||
|
||||
Reference in New Issue
Block a user