feature(database-connection): Add prototype for spinner

This commit is contained in:
2021-01-12 12:14:22 +01:00
parent 816d5df943
commit 7af903638d
10 changed files with 165 additions and 24 deletions

View File

@@ -6,9 +6,6 @@ export interface ErrorContainerProperties {
}
class ErrorContainer extends React.Component<ErrorContainerProperties> {
constructor(props: Readonly<ErrorContainerProperties>) {
super(props)
}
render() {
return (

View File

@@ -4,6 +4,7 @@ import {IUserListProperties} from "../UserList/UserList";
export interface SeasonDetailProperties {
seasonId: string,
maxSeasonId: string
dates: {
start: Date,
end: Date

View File

@@ -9,6 +9,7 @@ class SeasonSwitch extends React.Component<IUserListProperties> {
render() {
let seasonId = Number(this.props.userStats.seasonId)
let maxSeasonId = Number(this.props.userStats.maxSeasonId)
return(
<div className="SeasonSwitch" data-testid="SeasonSwitch">
{
@@ -20,9 +21,12 @@ class SeasonSwitch extends React.Component<IUserListProperties> {
<SeasonDetail {...this.props} />
<Link to={"/season/" + (seasonId + 1)} onClick={() => this.props.onSeasonIdChange('' + (seasonId + 1))}>
<FontAwesomeIcon icon="arrow-circle-right" />
</Link>
{
seasonId !== maxSeasonId
&& <Link to={"/season/" + (seasonId + 1)} onClick={() => this.props.onSeasonIdChange('' + (seasonId + 1))}>
<FontAwesomeIcon icon="arrow-circle-right" />
</Link>
}
</div>
)
}

View File

@@ -12,12 +12,6 @@ import UserStatsResponse from "../../models/UserStatsResponse";
export default class UserList extends React.Component<IUserListProperties, IUserListState> {
constructor(props: Readonly<IUserListProperties> | IUserListProperties) {
super(props);
// this.state = { mocked: this.props.mocked }
}
private createTableEntries(entries: TableEntry[]) {
return entries.map((entry, index) => {
const placement = index + 1;