Skip to content

Commit

Permalink
💬 update scoring area text
Browse files Browse the repository at this point in the history
  • Loading branch information
nguyenank committed Jan 12, 2022
1 parent 0e1395d commit 187b50c
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions js/details/modal/main-page.js
Original file line number Diff line number Diff line change
Expand Up @@ -387,12 +387,11 @@ function createSpecialDetailsOptions(id = "#special-details-options") {
specialDetails.append("h6").text("Special Details");

let scoringArea;
let distanceDescription;
switch (sport) {
case "volleyball-ncaa":
case "volleyball":
case "football-ncaa":
case "football-nfl":
distanceDescription = `Distance between locations for 2-location events.`;
scoringArea = null;
break;
case "basketball-nba":
case "basketball-ncaa":
Expand All @@ -402,15 +401,18 @@ function createSpecialDetailsOptions(id = "#special-details-options") {
case "floorball":
case "ice-hockey-iihf":
case "ice-hockey":
case "mens-lacrosse":
case "womens-lacrosse":
scoringArea = "net";
break;
default:
scoringArea = "scoring area";
break;
}

distanceDescription = scoringArea
const distanceDescription = scoringArea
? `Distance to closest ${scoringArea} for 1-location events; distance between locations for 2-location events.`
: distanceDescription;
: `Distance between locations for 2-location events.`;

const sdList = [
{
Expand Down

0 comments on commit 187b50c

Please sign in to comment.