theme fix

This commit is contained in:
2026-03-26 15:23:08 +05:30
parent fa10677e41
commit 2b293a20b7
7 changed files with 95 additions and 102 deletions

View File

@@ -1,6 +1,7 @@
import { type ReactNode } from 'react'
import { Navigate, useLocation } from 'react-router-dom'
import { useAuth } from '../contexts/AuthContext'
import { PageLoader } from './PageLoader'
type Props = {
children: ReactNode
@@ -11,12 +12,7 @@ export function ProtectedRoute({ children }: Props) {
const location = useLocation()
if (loading) {
return (
<div className="protected-route__loading" aria-live="polite">
<span className="protected-route__spinner" aria-hidden />
<p>Loading</p>
</div>
)
return <PageLoader />
}
if (!user) {