Skip to content

Commit e96e876

Browse files
committed
fix: replaced loading text with actual spinner and removed debug lines
1 parent ee8f2c1 commit e96e876

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/ui/components/PrivateRoute/PrivateRoute.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React from 'react';
1+
import CircularProgress from '@material-ui/core/CircularProgress';
22
import { Navigate } from 'react-router-dom';
33
import { useAuth } from '../../auth/AuthProvider';
44

@@ -7,12 +7,10 @@ const PrivateRoute = ({ component: Component, adminOnly = false }) => {
77
console.debug('PrivateRoute', { user, isLoading, adminOnly });
88

99
if (isLoading) {
10-
console.debug('Auth is loading, waiting');
11-
return <div>Loading...</div>; // TODO: Add loading spinner
10+
return <CircularProgress />;
1211
}
1312

1413
if (!user) {
15-
console.debug('User not logged in, redirecting to login page');
1614
return <Navigate to="/login" />;
1715
}
1816

0 commit comments

Comments
 (0)