S
Size: a a a
S
c
c
OH
c
const PrivateRoute = ({ component: Component, handleChildFunc, ...rest }) => {
const user = "token from cookie";
return <Route {...rest} render={(props) => (
user !== null
? <Component {...props} user={user} handleChildFunc={handleChildFunc}/>
: <Redirect to='/login' />
)}
/>
}
V🦖
c
c
c
c
V🦖
c
V🦖
c
c
V🦖
c
c