refactor
This commit is contained in:
parent
fa35a34355
commit
ba2ec6e3c6
|
@ -1,4 +0,0 @@
|
||||||
import DoudizhuGameView from "./DoudizhuGameView";
|
|
||||||
import LeducHoldemGameView from "./LeducHoldemGameView";
|
|
||||||
|
|
||||||
export {DoudizhuGameView, LeducHoldemGameView};
|
|
|
@ -2,7 +2,6 @@ import React from 'react';
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
import '../../assets/gameview.scss';
|
import '../../assets/gameview.scss';
|
||||||
import { DoudizhuGameBoard } from '../../components/GameBoard';
|
import { DoudizhuGameBoard } from '../../components/GameBoard';
|
||||||
import Navbar from "../../components/Navbar";
|
|
||||||
import {removeCards, doubleRaf, deepCopy, computeHandCardsWidth, translateCardData} from "../../utils";
|
import {removeCards, doubleRaf, deepCopy, computeHandCardsWidth, translateCardData} from "../../utils";
|
||||||
import { apiUrl } from "../../utils/config";
|
import { apiUrl } from "../../utils/config";
|
||||||
|
|
||||||
|
@ -25,7 +24,7 @@ import DialogActions from "@material-ui/core/DialogActions";
|
||||||
import Dialog from "@material-ui/core/Dialog";
|
import Dialog from "@material-ui/core/Dialog";
|
||||||
import qs from "query-string";
|
import qs from "query-string";
|
||||||
|
|
||||||
class DoudizhuGameView extends React.Component {
|
class DoudizhuReplayView extends React.Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
|
|
||||||
|
@ -381,7 +380,6 @@ class DoudizhuGameView extends React.Component {
|
||||||
</Button>
|
</Button>
|
||||||
</DialogActions>
|
</DialogActions>
|
||||||
</Dialog>
|
</Dialog>
|
||||||
<Navbar gameName={"Doudizhu"} />
|
|
||||||
<div className={"doudizhu-view-container"}>
|
<div className={"doudizhu-view-container"}>
|
||||||
<Layout.Row style={{"height": "540px"}}>
|
<Layout.Row style={{"height": "540px"}}>
|
||||||
<Layout.Col style={{"height": "100%"}} span="17">
|
<Layout.Col style={{"height": "100%"}} span="17">
|
||||||
|
@ -493,4 +491,4 @@ class DoudizhuGameView extends React.Component {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default DoudizhuGameView;
|
export default DoudizhuReplayView;
|
|
@ -3,7 +3,6 @@ import axios from 'axios';
|
||||||
import qs from 'query-string';
|
import qs from 'query-string';
|
||||||
import '../../assets/gameview.scss';
|
import '../../assets/gameview.scss';
|
||||||
import {LeducHoldemGameBoard} from '../../components/GameBoard';
|
import {LeducHoldemGameBoard} from '../../components/GameBoard';
|
||||||
import Navbar from '../../components/Navbar';
|
|
||||||
import {deepCopy} from "../../utils";
|
import {deepCopy} from "../../utils";
|
||||||
import { apiUrl } from "../../utils/config";
|
import { apiUrl } from "../../utils/config";
|
||||||
|
|
||||||
|
@ -26,7 +25,7 @@ import DialogContent from '@material-ui/core/DialogContent';
|
||||||
import DialogContentText from '@material-ui/core/DialogContentText';
|
import DialogContentText from '@material-ui/core/DialogContentText';
|
||||||
import DialogTitle from '@material-ui/core/DialogTitle';
|
import DialogTitle from '@material-ui/core/DialogTitle';
|
||||||
|
|
||||||
class LeducHoldemGameView extends React.Component {
|
class LeducHoldemReplayView extends React.Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
|
|
||||||
|
@ -398,7 +397,6 @@ class LeducHoldemGameView extends React.Component {
|
||||||
</Button>
|
</Button>
|
||||||
</DialogActions>
|
</DialogActions>
|
||||||
</Dialog>
|
</Dialog>
|
||||||
<Navbar gameName="Leduc Hold'em" />
|
|
||||||
<div className={"leduc-view-container"}>
|
<div className={"leduc-view-container"}>
|
||||||
<Layout.Row style={{"height": "540px"}}>
|
<Layout.Row style={{"height": "540px"}}>
|
||||||
<Layout.Col style={{"height": "100%"}} span="17">
|
<Layout.Col style={{"height": "100%"}} span="17">
|
||||||
|
@ -513,4 +511,4 @@ class LeducHoldemGameView extends React.Component {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default LeducHoldemGameView;
|
export default LeducHoldemReplayView;
|
|
@ -0,0 +1,4 @@
|
||||||
|
import DoudizhuReplayView from "./DoudizhuReplayView";
|
||||||
|
import LeducHoldemReplayView from "./LeducHoldemReplayView";
|
||||||
|
|
||||||
|
export {DoudizhuReplayView, LeducHoldemReplayView};
|
Loading…
Reference in New Issue