From 395aaa131695caef6d45a187a6453581be24c96d Mon Sep 17 00:00:00 2001 From: Hugo Bernier Date: Thu, 28 May 2020 22:39:55 -0400 Subject: [PATCH] Update WordHighScores.tsx --- .../wordGame/components/WordHighScores.tsx | 66 +++++++++---------- 1 file changed, 32 insertions(+), 34 deletions(-) diff --git a/samples/react-word-game/src/webparts/wordGame/components/WordHighScores.tsx b/samples/react-word-game/src/webparts/wordGame/components/WordHighScores.tsx index ef1a90586..764c010ec 100644 --- a/samples/react-word-game/src/webparts/wordGame/components/WordHighScores.tsx +++ b/samples/react-word-game/src/webparts/wordGame/components/WordHighScores.tsx @@ -1,42 +1,40 @@ -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 { - constructor() { - super(); + constructor() { + super(); - } + } - public render(): React.ReactElement { - let rank = 1; - return ( -
- { - this.props.scores.length>0 ? -

High Scores

: '' - - } - - - { - this.props.scores.map(score => ( - - - - - - - )) - } - -
{rank++ + ') '}{score.Name} Score: {score.Score} Seconds: {score.Seconds}
-
- ); - } - -} \ No newline at end of file + public render(): React.ReactElement { + let rank: number = 1; + return ( +
+ { + this.props.scores.length > 0 ? +

High Scores

: '' + } + + + { + this.props.scores.map(score => ( + + + + + + + )) + } + +
{rank++ + ') '}{score.Name} Score: {score.Score} Seconds: {score.Seconds}
+
+ ); + } +}