({ loggedin, children })
| 1 | |
| 2 | import { Navigate } from 'react-router-dom' |
| 3 | export default function ProtectedRoute({ loggedin, children }) { |
| 4 | console.log(loggedin); |
| 5 | if (loggedin) { |
| 6 | return children |
| 7 | } |
| 8 | else { |
| 9 | return <Navigate to="/login" /> |
| 10 | } |
| 11 | } |
nothing calls this directly
no outgoing calls
no test coverage detected