I have 2 variables that determine which components to render. personalInfo and cliente.
The problem I have is that when personalInfo equals false, the CompleteInfo component is not displayed (rendered). Instead, HomeCliente or HomeProveedor is rendered depending on the client variable.
<Route path="/home" render={() => ( personalInfo ? (cliente ? <HomeCliente /> : <HomeProveedor /> ) : <Completarinfo setRenderAgain={setRenderAgain} /> ) } ></Route>
Apparently the operator elvis is walking backwards. What is the problem here?
return(
<IonApp>
<IonReactRouter>
<IonSplitPane contentId="main" when="(min-width: 4096px)">
<Menu renderAgain={renderAgain} />
<IonRouterOutlet id="main">
<Route path="/home" render={() => ( personalInfo ? (cliente ? <HomeCliente /> : <HomeProveedor /> ) : <Completarinfo setRenderAgain={setRenderAgain} /> ) } ></Route>
</IonRouterOutlet>
</IonSplitPane>
</IonReactRouter>
</IonApp>
);
};
6 posts - 2 participants