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:
2025-08-27 16:15:42 -06:00
parent 234c41d0b6
commit 3bc4498e4f
11 changed files with 1279 additions and 1313 deletions

View File

@@ -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">