Skip to content

Commit

Permalink
feat(infobox): show the stay22 accommodation button on events with mu…
Browse files Browse the repository at this point in the history
…ltiple venues in same city (#5159)
  • Loading branch information
Rathoz authored Dec 2, 2024
1 parent b73df16 commit 20c257a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions components/infobox/commons/infobox_league.lua
Original file line number Diff line number Diff line change
Expand Up @@ -232,8 +232,8 @@ function League:createInfobox()
return
end
local locations = Locale.formatLocations(args)
-- If more than one venue, don't show the accommodation section, as it is unclear which one the link is for
if locations.venue2 or locations.city2 then
-- If more than one city, don't show the accommodation section, as it is unclear which one the link is for
if locations.city2 then
return
end
-- Must have a venue or a city to show the accommodation section
Expand All @@ -257,7 +257,8 @@ function League:createInfobox()
end

local addressParts = {}
table.insert(addressParts, locations.venue1)
-- Only add the venue if there is exactly one venue, otherwise we'll only use the city + country
table.insert(addressParts, not locations.venue2 and locations.venue1 or nil)
table.insert(addressParts, locations.city1)
table.insert(addressParts, Flags.CountryName(locations.country1 or locations.region1))

Expand Down

0 comments on commit 20c257a

Please sign in to comment.