init PVE Doudizhu view file

This commit is contained in:
Songyi Huang 2021-04-13 21:07:43 -07:00
parent 3b3e7f7650
commit 66639d1aa8
3 changed files with 26 additions and 1 deletions

View File

@ -2,6 +2,7 @@ import React from 'react';
import { BrowserRouter as Router, Route, Redirect } from "react-router-dom"; import { BrowserRouter as Router, Route, Redirect } from "react-router-dom";
import LeaderBoard from './view/LeaderBoard'; import LeaderBoard from './view/LeaderBoard';
import { DoudizhuGameView, LeducHoldemGameView } from './view/GameView'; import { DoudizhuGameView, LeducHoldemGameView } from './view/GameView';
import { PVEDoudizhuDemoView } from './view/PVEView';
import Navbar from "./components/Navbar"; import Navbar from "./components/Navbar";
import {makeStyles} from "@material-ui/core/styles"; import {makeStyles} from "@material-ui/core/styles";
@ -13,16 +14,22 @@ const useStyles = makeStyles(() => ({
function App() { function App() {
const classes = useStyles(); const classes = useStyles();
// todo: add 404 page
return ( return (
<Router> <Router>
<Navbar className={classes.navBar} gameName={""}/> <Navbar className={classes.navBar} gameName={""}/>
<div style={{marginTop: '75px'}}> <div style={{marginTop: '75px'}}>
<Route exact path="/"> <Route exact path="/">
<Redirect to="/leaderboard?type=game&name=leduc-holdem" /> {/* for test use */}
{/* <Redirect to="/leaderboard?type=game&name=leduc-holdem" /> */}
<Redirect to="/pve-doudizhu-demo" />
</Route> </Route>
<Route path="/leaderboard" component={LeaderBoard} /> <Route path="/leaderboard" component={LeaderBoard} />
<Route path="/replay/doudizhu" component={DoudizhuGameView} /> <Route path="/replay/doudizhu" component={DoudizhuGameView} />
<Route path="/replay/leduc-holdem" component={LeducHoldemGameView} /> <Route path="/replay/leduc-holdem" component={LeducHoldemGameView} />
<Route path="/pve-doudizhu-demo" component={PVEDoudizhuDemoView} />
</div> </div>
</Router> </Router>
); );

View File

@ -0,0 +1,15 @@
import React from 'react';
class PVEDoudizhuDemoView extends React.Component {
constructor(props) {
super(props);
}
render() {
return (
<div>Under Development...</div>
);
}
}
export default PVEDoudizhuDemoView;

View File

@ -0,0 +1,3 @@
import PVEDoudizhuDemoView from './PVEDoudizhuDemoView';
export {PVEDoudizhuDemoView};