feature(database-connection): Fix routing and refactor style sheets
This commit is contained in:
@@ -1 +1,13 @@
|
||||
.SeasonSwitch {}
|
||||
.SeasonSwitch {
|
||||
|
||||
|
||||
a {
|
||||
font-size: 3vw;
|
||||
max-font-size: 4vw;
|
||||
padding-left: 1em;
|
||||
padding-right: 1em;
|
||||
vertical-align: middle;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -2,24 +2,27 @@ import React from 'react';
|
||||
import { Link } from 'react-router-dom';
|
||||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
||||
import './SeasonSwitch.scss';
|
||||
import SeasonDetail, { SeasonDetailProperties } from '../SeasonDetail/SeasonDetail';
|
||||
import {withRouter} from "react-router";
|
||||
import SeasonDetail from '../SeasonDetail/SeasonDetail';
|
||||
import {IUserListProperties} from "../UserList/UserList";
|
||||
|
||||
class SeasonSwitch extends React.Component<SeasonDetailProperties> {
|
||||
class SeasonSwitch extends React.Component<IUserListProperties> {
|
||||
|
||||
render() {
|
||||
let seasonId = Number(this.props.seasonId)
|
||||
let seasonId = Number(this.props.userStats.seasonId)
|
||||
return(
|
||||
<div className="SeasonSwitch" data-testid="SeasonSwitch">
|
||||
<Link to={"/season/" + (seasonId - 1)}>
|
||||
<FontAwesomeIcon icon="arrow-circle-left" />
|
||||
</Link>
|
||||
{
|
||||
seasonId > 1
|
||||
&& <Link to={"/season/" + (seasonId - 1)} onClick={() => this.props.onSeasonIdChange('' + (seasonId - 1))}>
|
||||
<FontAwesomeIcon icon="arrow-circle-left" />
|
||||
</Link>
|
||||
}
|
||||
|
||||
<SeasonDetail {...this.props} />
|
||||
<SeasonDetail {...this.props} />
|
||||
|
||||
<Link to={"/season/" + (seasonId + 1)}>
|
||||
<FontAwesomeIcon icon="arrow-circle-right" />
|
||||
</Link>
|
||||
<Link to={"/season/" + (seasonId + 1)} onClick={() => this.props.onSeasonIdChange('' + (seasonId + 1))}>
|
||||
<FontAwesomeIcon icon="arrow-circle-right" />
|
||||
</Link>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user