diff --git a/src/client/src/FrontPage.js b/src/client/src/FrontPage.js index f538dcd..a45cbe4 100644 --- a/src/client/src/FrontPage.js +++ b/src/client/src/FrontPage.js @@ -33,6 +33,10 @@ function shorten(description, maxLength) { } function TournamentListItem(props) { + const [longDescription, setLongDescription] = React.useState(false); + function toggleDescription() { + setLongDescription(!longDescription); + } return ( @@ -45,16 +49,16 @@ function TournamentListItem(props) { /> {props.tournament.name} - {shorten(props.tournament.description, 200)} - Start: {props.tournament.startTime.toLocaleString()} - End: {props.tournament.endTime.toLocaleString()} + Start: {props.tournament.startTime.toLocaleString()} + End: {props.tournament.endTime.toLocaleString()} Players {props.tournament.teamCount} / {props.tournament.teamLimit} - - + {longDescription ? props.tournament.description : shorten(props.tournament.description, 200)} + + - +