6
Sabro
6y

I'm confused... where am I supposed to be going again?

if (userInfo.isAdmin) {
return (<Redirect to="/my" />);
}

if (userInfo.isSuperUser) {
return (<Redirect to="/my" />);
}

return (<Redirect to="/my" />);

Comments
  • 7
    Raised the complexity for ya

    if (userInfo.isAdmin) {
    return “/my”;
    } else if (userInfo.isSuperUser) {
    return “/my”;
    } else if (!userInfo.isAdmin && !userInfo.isSuperUser) {
    return “/my”;
    }

    return “/my”;
Add Comment