Skip to content

Commit

Permalink
missing function
Browse files Browse the repository at this point in the history
  • Loading branch information
Rathoz committed Nov 13, 2024
1 parent 6ea61a2 commit 26cc4a9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
10 changes: 10 additions & 0 deletions components/match2/commons/match_group_display_helper.lua
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,16 @@ function DisplayHelper.DefaultMatchSummaryContainer(props)
return MatchSummaryModule.getByMatchId(props)
end

---@param props table
---@return Html
function DisplayHelper.DefaultGameSummaryContainer(props)
local GameSummaryModule = Lua.import('Module:GameSummary')

assert(GameSummaryModule.getGameByMatchId, 'Expected GameSummary.getGameByMatchId to be a function')

return GameSummaryModule.getGameByMatchId(props)
end

---@param props table
---@return Html
function DisplayHelper.DefaultMatchPageContainer(props)
Expand Down
4 changes: 2 additions & 2 deletions components/match2/wikis/apexlegends/game_summary.lua
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ local GAME_STANDINGS_COLUMNS = {
},
}
---@param props {bracketId: string, matchId: string, gameIdx: integer}
---@return string
---@return Html
function CustomGameSummary.getGameByMatchId(props)
---@class ApexMatchGroupUtilMatch
local match = MatchGroupUtil.fetchMatchForBracketDisplay(props.bracketId, props.matchId)
Expand All @@ -148,7 +148,7 @@ function CustomGameSummary.getGameByMatchId(props)
local gameSummary = mw.html.create()
gameSummary:node(CustomGameSummary._createGameTab(game, props.gameIdx, scoringData))

return tostring(gameSummary)
return gameSummary
end

---@param game table
Expand Down

0 comments on commit 26cc4a9

Please sign in to comment.