feature(database-connection): Fix routing and refactor style sheets

This commit is contained in:
2021-01-12 11:49:08 +01:00
parent 29b6974714
commit 816d5df943
15 changed files with 251 additions and 119 deletions

View File

@@ -15,7 +15,7 @@ export default class UserList extends React.Component<IUserListProperties, IUser
constructor(props: Readonly<IUserListProperties> | IUserListProperties) {
super(props);
this.state = { mocked: this.props.mocked }
// this.state = { mocked: this.props.mocked }
}
private createTableEntries(entries: TableEntry[]) {
@@ -51,7 +51,7 @@ export default class UserList extends React.Component<IUserListProperties, IUser
render() {
return (
<div className="UserList" data-testid="UserList">
<SeasonSwitch seasonId={this.props.userStats.seasonId} dates={this.props.userStats.dates} />
<SeasonSwitch onSeasonIdChange={this.props.onSeasonIdChange} userStats={this.props.userStats} />
<table>
<thead>
<tr>
@@ -65,14 +65,15 @@ export default class UserList extends React.Component<IUserListProperties, IUser
{this.createTableEntries(this.props.userStats.stats)}
</tbody>
</table>
</div>
</div>
)
}
}
interface IUserListProperties {
export interface IUserListProperties {
userStats: UserStatsResponse
mocked: boolean
mocked?: boolean
onSeasonIdChange: any
}
interface IUserListState {