renderPageBody()

in client/src/components/App.js [95:116]


  renderPageBody() {
    // If we have acquired the necessary policies, render desired page
    if (this.state.enterApp) {
      return (
        <Container style={styles.container}>
          <Switch>
            <Route path="/app/room/:roomType/:roomName" component={Chat} />
            <Route exact path="/app/rooms" component={Rooms} />
            <Route path="/" component={Rooms} />
          </Switch>
        </Container>
      );
    }

    // Otherwise display a loading spinner until API calls have succeeded
    return (
      <Route
        path="/"
        component={Spinner}
      />
    );
  }