theme fix
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user