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