Update WordHighScores.tsx

This commit is contained in:
Hugo Bernier 2020-05-28 22:39:55 -04:00 committed by GitHub
parent 50ea7ce668
commit 395aaa1316
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 32 additions and 34 deletions

View File

@ -1,8 +1,8 @@
import * as React from "react";
import { WordGameListItem } from "./WordService"
import * as React from 'react';
import { WordGameListItem } from './WordService';
export interface IWordHighScoresProps {
scores: WordGameListItem[]
scores: WordGameListItem[];
}
export default class WordHighScores extends React.Component<IWordHighScoresProps, {}> {
@ -13,13 +13,12 @@ export default class WordHighScores extends React.Component<IWordHighScoresProps
}
public render(): React.ReactElement<IWordHighScoresProps> {
let rank = 1;
let rank: number = 1;
return (
<div>
{
this.props.scores.length > 0 ?
<h3 style={{ textDecoration: 'underline' }}>High Scores</h3> : ''
}
<table style={{ marginLeft: 'Auto', marginRight: 'Auto' }}>
<tbody>
@ -38,5 +37,4 @@ export default class WordHighScores extends React.Component<IWordHighScoresProps
</div>
);
}
}