Skip to content

Commit

Permalink
Hide Favicon from teams character picture
Browse files Browse the repository at this point in the history
  • Loading branch information
HassnHamada committed Mar 15, 2024
1 parent 1163a73 commit 7e581b5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
18 changes: 11 additions & 7 deletions apps/frontend/src/app/Components/Character/CharacterCardPico.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,14 @@ export default function CharacterCardPico({
onMouseDown,
onMouseEnter,
hoverChild,
hideFav,
}: {
characterKey: CharacterKey
onClick?: (characterKey: CharacterKey) => void
onMouseDown?: (e: MouseEvent) => void
onMouseEnter?: (e: MouseEvent) => void
hoverChild?: React.ReactNode
hideFav?: boolean
}) {
const character = useCharacter(characterKey)
const { favorite } = useCharMeta(characterKey)
Expand Down Expand Up @@ -107,13 +109,15 @@ export default function CharacterCardPico({
</strong>
</Typography>
)}
<Box sx={{ position: 'absolute', top: 0, right: 0 }}>
{favorite ? (
<FavoriteIcon fontSize="small" />
) : (
<FavoriteBorderIcon fontSize="small" />
)}
</Box>
{!hideFav && (
<Box sx={{ position: 'absolute', top: 0, right: 0 }}>
{favorite ? (
<FavoriteIcon fontSize="small" />
) : (
<FavoriteBorderIcon fontSize="small" />
)}
</Box>
)}
{character && (
<Typography
sx={{
Expand Down
1 change: 1 addition & 0 deletions apps/frontend/src/app/PageTeams/TeamCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ export default function TeamCard({
/>
)
}
hideFav
/>
</CardActionArea>
) : (
Expand Down

0 comments on commit 7e581b5

Please sign in to comment.