Add HomePage.

This commit is contained in:
Yang Luo
2021-02-13 17:34:32 +08:00
parent 9677282017
commit 6824d558ca
5 changed files with 185 additions and 34 deletions

View File

@ -30,7 +30,7 @@ import ApplicationEditPage from "./ApplicationEditPage";
import Face from "./Face";
import AccountPage from "./account/AccountPage";
import LoginPage from "./account/LoginPage";
import HomePage from "./HomePage";
import HomePage from "./basic/HomePage";
import CustomGithubCorner from "./CustomGithubCorner";
const { Header, Footer } = Layout;
@ -270,7 +270,7 @@ class App extends Component {
</Header>
<Switch>
<Route exact path="/login" render={(props) => this.renderHomeIfLoggedIn(<LoginPage onLoggedIn={this.onLoggedIn.bind(this)} {...props} />)}/>
<Route exact path="/" render={(props) => this.renderLoginIfNotLoggedIn(<HomePage onLoggedIn={this.onLoggedIn.bind(this)} {...props} />)}/>
<Route exact path="/" render={(props) => this.renderLoginIfNotLoggedIn(<HomePage account={this.state.account} onLoggedIn={this.onLoggedIn.bind(this)} {...props} />)}/>
<Route exact path="/account" render={(props) => this.renderLoginIfNotLoggedIn(<AccountPage account={this.state.account} {...props} />)}/>
<Route exact path="/organizations" render={(props) => this.renderLoginIfNotLoggedIn(<OrganizationListPage account={this.state.account} {...props} />)}/>
<Route exact path="/organizations/:organizationName" render={(props) => this.renderLoginIfNotLoggedIn(<OrganizationEditPage account={this.state.account} {...props} />)}/>