Refactor authentication and theme context usage
All checks were successful
Frontend CI / lint (push) Successful in 9m46s
Frontend CI / build (push) Successful in 10m7s

- Moved authentication hooks and context to a dedicated hooks directory.
- Updated imports in various components and pages to use the new hooks.
- Created AuthContext and ThemeContext for better state management.
- Refactored ThemeProvider to utilize the new ThemeContext.
- Cleaned up sidebar and button components for consistency and readability.
- Ensured all components are using the latest context and hooks for authentication and theme management.
This commit is contained in:
JSC
2025-07-01 17:50:26 +02:00
parent c120635dea
commit 05627c55c5
16 changed files with 258 additions and 240 deletions

View File

@@ -1,6 +1,6 @@
import { type ReactNode } from 'react'
import { Navigate } from 'react-router'
import { useAuth } from '@/contexts/AuthContext'
import { useAuth } from '@/hooks/use-auth'
interface ProtectedRouteProps {
children: ReactNode