mirror of
https://github.com/hydralauncher/hydra.git
synced 2026-01-28 21:31:03 +00:00
feat: refactor assets in game details page
This commit is contained in:
@@ -34,8 +34,8 @@ const getGameShopDetails = async (
|
||||
gamesShopAssetsSublevel.get(levelKeys.game(shop, objectId)),
|
||||
]);
|
||||
|
||||
const appDetails: Promise<ShopDetailsWithAssets | null> =
|
||||
getLocalizedSteamAppDetails(objectId, language).then((result) => {
|
||||
const appDetails = getLocalizedSteamAppDetails(objectId, language).then(
|
||||
(result) => {
|
||||
if (result) {
|
||||
result.name = cachedAssets?.title ?? result.name;
|
||||
|
||||
@@ -47,21 +47,22 @@ const getGameShopDetails = async (
|
||||
|
||||
return {
|
||||
...result,
|
||||
...cachedAssets,
|
||||
assets: cachedAssets ?? null,
|
||||
};
|
||||
}
|
||||
|
||||
return null;
|
||||
});
|
||||
}
|
||||
);
|
||||
|
||||
if (cachedData) {
|
||||
return {
|
||||
...cachedData,
|
||||
...cachedAssets,
|
||||
assets: cachedAssets ?? null,
|
||||
};
|
||||
}
|
||||
|
||||
return Promise.resolve(appDetails);
|
||||
return appDetails;
|
||||
}
|
||||
|
||||
throw new Error("Not implemented");
|
||||
|
||||
Reference in New Issue
Block a user