diff --git a/src/client/src/FrontPage.js b/src/client/src/FrontPage.js index ea75da8..f538dcd 100644 --- a/src/client/src/FrontPage.js +++ b/src/client/src/FrontPage.js @@ -25,6 +25,13 @@ function CreateButton(props) { ); } +function shorten(description, maxLength) { + if (description.length > maxLength) { + return description.substring(0, maxLength) + "..."; + } + return description; +} + function TournamentListItem(props) { return ( @@ -38,7 +45,7 @@ function TournamentListItem(props) { /> {props.tournament.name} - {props.tournament.description} + {shorten(props.tournament.description, 200)} Start: {props.tournament.startTime.toLocaleString()} End: {props.tournament.endTime.toLocaleString()} Players {props.tournament.teamCount} / {props.tournament.teamLimit} diff --git a/src/client/src/TournamentManager.js b/src/client/src/TournamentManager.js index e331ae9..3ed5e11 100644 --- a/src/client/src/TournamentManager.js +++ b/src/client/src/TournamentManager.js @@ -120,7 +120,7 @@ function ManageTournament(props) { {/* Edit name: */} {/* Edit description: */} - + {/*