Skip to content

How to create nested routes ? I am trying to create nested route under /app but it's not working  #555

Open
@khalilchris

Description

@khalilchris

I am trying to create nested routes under /app but I can't get it to work

export default makeRouteConfig(
  <Route>
    <Route path="/" Component={SignIn} />
    <Route
      path="/app"
      Component={AppRoot}
      query={RoutesAppRootQuery}
      render={({ props, error, resolving }) => {
        if (error && resolving) {
          throw new RedirectException('/');
        }
        if (props) {
          const { match, router, user } = props;
          return <AppRoot match={match} router={router} user={user} />;
        }
        return <Loading />;
      }}
      fetchPolicy="store-and-network"
      prepareVariables={(params) => {
        const uuid = firebase.auth().currentUser?.uid;
        return {
          ...params,
          uuid,
        };
      }}
    >
      <Route path="account" Component={AccountMain} />
      <Route path="contacts" Component={Contacts} />
      <Route path="home" Component={Home} />
    </Route>
    <Route path="/vourtsa-editor" Component={VourtsaEditor} />
    <Route path="/terms-privacy" Component={TermsAndPrivacy} />
    <Route path="/support" Component={Support} />
    <Route path="/sales-refund" Component={SalesRefund} />
    <Route path="/guide" Component={Guide} />
    <Route path="/*" Component={PageNotFound} />
    <Route path="/create-account-options" Component={SignUpOptions} />
    <Route path="/create-account-email" Component={SignupWithEmail} />
    <Route path="/forgot-password" Component={ForgotPassword} />
    <Route path="/login-options" Component={SignInOptions} />
  </Route>,
);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions