Skip to content

Commit

Permalink
feat(match2): hide agents on valorant in mobile view
Browse files Browse the repository at this point in the history
  • Loading branch information
Rathoz committed Nov 8, 2024
1 parent 744ea88 commit 6999597
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion components/match2/wikis/valorant/match_summary.lua
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ function CustomMatchSummary.createGame(date, game, gameIndex)
local characters = Array.map((game.opponents[opponentIndex] or {}).players or {}, Operator.property('agent'))
return {
MatchSummaryWidgets.GameWinLossIndicator{winner = game.winner, opponentIndex = opponentIndex},
MatchSummaryWidgets.Characters{characters = characters, flipped = flipped},
MatchSummaryWidgets.Characters{characters = characters, flipped = flipped, hideOnMobile = true},
MatchSummaryWidgets.DetailedScore{
score = scoreDisplay(opponentIndex),
flipped = flipped,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ local HOVER_MODIFIER = 2.5 -- From brkts-champion-icon in Brackets.less
local MatchSummaryCharacters = Class.new(Widget)
MatchSummaryCharacters.defaultProps = {
flipped = false,
hideOnMobile = false,
size = BASE_SIZE * HOVER_MODIFIER,
}

Expand All @@ -34,11 +35,12 @@ function MatchSummaryCharacters:render()
local flipped = self.props.flipped

return Div{
classes = {
classes = Array.extend(
'brkts-popup-body-element-thumbs',
'brkts-champion-icon',
flipped and 'brkts-popup-body-element-thumbs-right' or nil,
},
self.props.hideOnMobile and 'hide-mobile' or nil
),
children = Array.map(self.props.characters, function(character)
return Character{
character = character,
Expand Down

0 comments on commit 6999597

Please sign in to comment.