Routing with Tab does not work properly

I would suggest you start with the tabs template and then add the authentication pages… it looks like you have the routing setup wrong.

But this is something that I see a lot of folks struggle with the first time, I really think there needs to be a template with the Tabs on their own file… SO that is what I got for you here.

//App.tsx

  <IonApp>
    <IonReactRouter>
      <Route exact path="/">
        <Redirect to="/tabs/tab1" />
      </Route>
      <Route exact path="/login">
        <Login />
      </Route>
      <Route path="/tabs">
        <TabRoot />
      </Route>
    </IonReactRouter>
  </IonApp>

then your TabRoot Component

// TabRoot
const TabRoot: React.FC = () => (
  <IonTabs>
    <IonRouterOutlet>
      <Route exact path="/">
        <Redirect to="/tabs/tab1" />
      </Route>
      <Route exact path="/tabs/tab1">
        <Tab1 />
      </Route>
      <Route exact path="/tabs/tab2">
        <Tab2 />
      </Route>
      <Route path="/tabs/tab3">
        <Tab3 />
      </Route>
    </IonRouterOutlet>
    <IonTabBar slot="bottom">
      <IonTabButton tab="tab1" href="/tabs/tab1">
        <IonIcon icon={triangle} />
        <IonLabel>Tab 1</IonLabel>
      </IonTabButton>
      <IonTabButton tab="tab2" href="/tabs/tab2">
        <IonIcon icon={ellipse} />
        <IonLabel>Tab 2</IonLabel>
      </IonTabButton>
      <IonTabButton tab="tab3" href="/tabs/tab3">
        <IonIcon icon={square} />
        <IonLabel>Tab 3</IonLabel>
      </IonTabButton>
    </IonTabBar>
  </IonTabs>
);