Enter your Bluesky or ATProto handle (e.g., yourname.bsky.social)
+Enter your Bluesky or ATProto handle
diff --git a/src/components/ProtectedRoute.jsx b/src/components/ProtectedRoute.jsx new file mode 100644 index 0000000..88d44fc --- /dev/null +++ b/src/components/ProtectedRoute.jsx @@ -0,0 +1,24 @@ +import React from 'react'; +import { Navigate, useLocation } from 'react-router-dom'; +import { useAuth } from '../contexts/AuthContext'; + +const ProtectedRoute = ({ children }) => { + const { isAuthenticated, authLoading } = useAuth(); // Assuming 'authLoading' is the correct name from context + const location = useLocation(); + + if (authLoading) { + // Optional: Display a loading indicator while checking auth status + return