Fix: deleted favorite icon from profile game card and fixed the media for showing short format of hours

This commit is contained in:
Moyasee
2025-09-30 02:46:58 +03:00
parent e5646240ab
commit de4b039d10
2 changed files with 17 additions and 47 deletions

View File

@@ -91,28 +91,6 @@
z-index: 2;
}
&__favorite-icon {
color: rgba(255, 255, 255, 0.8);
background: rgba(0, 0, 0, 0.4);
backdrop-filter: blur(8px);
-webkit-backdrop-filter: blur(8px);
border: solid 1px rgba(255, 255, 255, 0.15);
border-radius: 50%;
padding: 6px;
display: flex;
align-items: center;
justify-content: center;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
transition: all ease 0.2s;
&:hover {
background: rgba(0, 0, 0, 0.5);
border-color: rgba(255, 255, 255, 0.25);
transform: translateY(-1px);
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}
}
&__pin-button {
color: rgba(255, 255, 255, 0.8);
background: rgba(0, 0, 0, 0.4);
@@ -173,7 +151,7 @@
}
// When the card is narrow (less than 180px), show short format
@container (max-width: 180px) {
@container (max-width: 140px) {
&-long {
display: none;
}

View File

@@ -13,7 +13,6 @@ import {
ClockIcon,
TrophyIcon,
AlertFillIcon,
HeartFillIcon,
PinIcon,
PinSlashIcon,
} from "@primer/octicons-react";
@@ -135,30 +134,23 @@ export function UserLibraryGameCard({
onClick={() => navigate(buildUserGameDetailsPath(game))}
>
<div className="user-library-game__overlay">
{(game.isFavorite || isMe) && (
{isMe && (
<div className="user-library-game__actions-container">
{game.isFavorite && (
<div className="user-library-game__favorite-icon">
<HeartFillIcon size={12} />
</div>
)}
{isMe && (
<button
type="button"
className="user-library-game__pin-button"
onClick={(e) => {
e.stopPropagation();
toggleGamePinned();
}}
disabled={isPinning}
>
{game.isPinned ? (
<PinSlashIcon size={12} />
) : (
<PinIcon size={12} />
)}
</button>
)}
<button
type="button"
className="user-library-game__pin-button"
onClick={(e) => {
e.stopPropagation();
toggleGamePinned();
}}
disabled={isPinning}
>
{game.isPinned ? (
<PinSlashIcon size={12} />
) : (
<PinIcon size={12} />
)}
</button>
</div>
)}
<div