change default page
This commit is contained in:
parent
e57e26dc5f
commit
1593b1235a
23
src/App.js
23
src/App.js
|
@ -1,15 +1,15 @@
|
|||
import React from 'react';
|
||||
import { BrowserRouter as Router, Route, Redirect } from "react-router-dom";
|
||||
import { BrowserRouter as Router, Redirect, Route } from 'react-router-dom';
|
||||
import Navbar from './components/Navbar';
|
||||
import LeaderBoard from './view/LeaderBoard';
|
||||
import { DoudizhuReplayView, LeducHoldemReplayView } from './view/ReplayView';
|
||||
import { PvEDoudizhuDemoView } from './view/PvEView';
|
||||
import Navbar from "./components/Navbar";
|
||||
import { DoudizhuReplayView, LeducHoldemReplayView } from './view/ReplayView';
|
||||
|
||||
const navbarSubtitleMap = {
|
||||
"/leaderboard": "",
|
||||
"/replay/doudizhu": "Doudizhu",
|
||||
"/replay/leduc-holdem": "Leduc Hold'em",
|
||||
"/pve/doudizhu-demo": "Doudizhu PvE Demo"
|
||||
'/leaderboard': '',
|
||||
'/replay/doudizhu': 'Doudizhu',
|
||||
'/replay/leduc-holdem': "Leduc Hold'em",
|
||||
'/pve/doudizhu-demo': 'Doudizhu PvE Demo',
|
||||
};
|
||||
|
||||
function App() {
|
||||
|
@ -17,12 +17,11 @@ function App() {
|
|||
|
||||
return (
|
||||
<Router>
|
||||
<Navbar subtitleMap={navbarSubtitleMap}/>
|
||||
<div style={{marginTop: '75px'}}>
|
||||
<Navbar subtitleMap={navbarSubtitleMap} />
|
||||
<div style={{ marginTop: '75px' }}>
|
||||
<Route exact path="/">
|
||||
{/* for test use */}
|
||||
{/* <Redirect to="/leaderboard?type=game&name=leduc-holdem" /> */}
|
||||
<Redirect to="/pve/doudizhu-demo" />
|
||||
<Redirect to="/leaderboard?type=game&name=leduc-holdem" />
|
||||
{/* <Redirect to="/pve/doudizhu-demo" /> */}
|
||||
</Route>
|
||||
<Route path="/leaderboard" component={LeaderBoard} />
|
||||
<Route path="/replay/doudizhu" component={DoudizhuReplayView} />
|
||||
|
|
|
@ -77,9 +77,6 @@ function PvEDoudizhuDemoView() {
|
|||
.join('');
|
||||
};
|
||||
|
||||
// todo: generate inital player / hand states
|
||||
// for test use
|
||||
|
||||
function timeout(ms) {
|
||||
return new Promise((resolve) => setTimeout(resolve, ms));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue