diff --git a/src/client/src/FrontPage.js b/src/client/src/FrontPage.js index e642c3e..7690018 100644 --- a/src/client/src/FrontPage.js +++ b/src/client/src/FrontPage.js @@ -36,6 +36,7 @@ function shorten(description, maxLength) { function TournamentListItem(props) { const [longDescription, setLongDescription] = React.useState(false); + const maxLength = 200; function toggleDescription() { setLongDescription(!longDescription); } @@ -45,9 +46,11 @@ function TournamentListItem(props) { {props.tournament.description} ) + } else if (props.tournament.description.length < maxLength) { + return {props.tournament.description} } else { return - {shorten(props.tournament.description, 200)} + {shorten(props.tournament.description, maxLength)} ; }