mirror of
https://github.com/hydralauncher/hydra.git
synced 2026-01-11 13:56:16 +00:00
fixed background color in hero arent being properly used if game is custom
This commit is contained in:
@@ -68,8 +68,17 @@ export function GameDetailsContent() {
|
||||
const [showEditGameModal, setShowEditGameModal] = useState(false);
|
||||
|
||||
const handleHeroLoad = async () => {
|
||||
// Use the same logic as heroImage to get the correct URL for both custom and non-custom games
|
||||
const isCustomGame = game?.shop === "custom";
|
||||
const heroImageUrl = isCustomGame
|
||||
? game?.libraryHeroImageUrl || game?.iconUrl || ""
|
||||
: getImageWithCustomPriority(
|
||||
game?.customHeroImageUrl,
|
||||
shopDetails?.assets?.libraryHeroImageUrl
|
||||
);
|
||||
|
||||
const output = await average(
|
||||
shopDetails?.assets?.libraryHeroImageUrl ?? "",
|
||||
heroImageUrl,
|
||||
{
|
||||
amount: 1,
|
||||
format: "hex",
|
||||
|
||||
@@ -92,7 +92,7 @@ export function GameOptionsModal({
|
||||
await removeGameFromLibrary(game.shop, game.objectId);
|
||||
updateGame();
|
||||
onClose();
|
||||
|
||||
|
||||
// Redirect to home page if it's a custom game
|
||||
if (game.shop === "custom" && onNavigateHome) {
|
||||
onNavigateHome();
|
||||
|
||||
Reference in New Issue
Block a user