How to flow type this:
function PrivateRoute({
component: Component,
isAuthed,
...rest
}) {
return (
<Route
{...rest}
render={props =>
isAuthed === true ? (
<Component {...props} />
) : (
<Redirect
to={{ pathname: "/login", state: { from: props.location } }}
/>
)}
/>
);
}
Some context:
No responses yet.