mirror of
https://github.com/kjanat/livedash-node.git
synced 2026-01-16 09:52:09 +01:00
- Fix 36+ biome linting issues reducing errors/warnings from 227 to 191 - Replace explicit 'any' types with proper TypeScript interfaces - Fix React hooks dependencies and useCallback patterns - Resolve unused variables and parameter assignment issues - Improve accessibility with proper label associations - Add comprehensive API documentation for admin and security features - Update README.md with accurate PostgreSQL setup and current tech stack - Create complete documentation for audit logging, CSP monitoring, and batch processing - Fix outdated project information and missing developer workflows
30 lines
903 B
TypeScript
30 lines
903 B
TypeScript
"use client";
|
|
|
|
import { SessionProvider } from "next-auth/react";
|
|
import type { ReactNode } from "react";
|
|
import { CSRFProvider } from "@/components/providers/CSRFProvider";
|
|
import { TRPCProvider } from "@/components/providers/TRPCProvider";
|
|
import { ThemeProvider } from "@/components/theme-provider";
|
|
|
|
export function Providers({ children }: { children: ReactNode }) {
|
|
// Including error handling and refetch interval for better user experience
|
|
return (
|
|
<ThemeProvider
|
|
attribute="class"
|
|
defaultTheme="system"
|
|
enableSystem
|
|
disableTransitionOnChange
|
|
>
|
|
<SessionProvider
|
|
// Re-fetch session every 30 minutes (reduced from 10)
|
|
refetchInterval={30 * 60}
|
|
refetchOnWindowFocus={false}
|
|
>
|
|
<CSRFProvider>
|
|
<TRPCProvider>{children}</TRPCProvider>
|
|
</CSRFProvider>
|
|
</SessionProvider>
|
|
</ThemeProvider>
|
|
);
|
|
}
|