security fix

This commit is contained in:
Moyasee
2025-09-19 17:15:59 +03:00
parent f4e84e46cc
commit 672ddff9f8
7 changed files with 31 additions and 17 deletions

View File

@@ -120,7 +120,7 @@ export function GameDetailsContent() {
}, [getGameArtifacts]);
const isCustomGame = game?.shop === "custom";
// Helper function to get image with custom asset priority
const getImageWithCustomPriority = (
customUrl: string | null | undefined,
@@ -136,7 +136,7 @@ export function GameDetailsContent() {
game?.customHeroImageUrl,
shopDetails?.assets?.libraryHeroImageUrl
);
const logoImage = isCustomGame
? game?.logoImageUrl || ""
: getImageWithCustomPriority(
@@ -181,7 +181,11 @@ export function GameDetailsContent() {
<button
type="button"
className="game-details__edit-custom-game-button"
onClick={game?.shop === "custom" ? handleEditCustomGameClick : handleEditGameClick}
onClick={
game?.shop === "custom"
? handleEditCustomGameClick
: handleEditGameClick
}
title={t("edit_custom_game")}
>
<PencilIcon size={16} />

View File

@@ -44,4 +44,4 @@
.edit-game-modal__actions button {
min-width: 100px;
}
}

View File

@@ -364,4 +364,4 @@ export function EditGameModal({
</div>
</Modal>
);
}
}