feat: optimize achievement and debrid request

This commit is contained in:
Zamitto
2025-04-13 07:39:48 -03:00
parent 19613b69cc
commit 8db03bcccf
6 changed files with 16 additions and 12 deletions

View File

@@ -86,7 +86,10 @@ export function GameDetailsContextProvider({
const [showGameOptionsModal, setShowGameOptionsModal] = useState(false);
const { getRepacksForObjectId } = useRepacks();
const repacks = getRepacksForObjectId(objectId);
const repacks = useMemo(() => {
return getRepacksForObjectId(objectId);
}, [getRepacksForObjectId, objectId]);
const { i18n } = useTranslation("game_details");

View File

@@ -10,15 +10,6 @@ export interface HowLongToBeatEntry {
updatedAt: Date;
}
export interface CatalogueCache {
id?: number;
category: string;
games: { objectId: string; shop: GameShop }[];
createdAt: Date;
updatedAt: Date;
expiresAt: Date;
}
export const db = new Dexie("Hydra");
db.version(9).stores({

View File

@@ -122,8 +122,8 @@ export function Sidebar() {
<h3>{t("sign_in_to_see_achievements")}</h3>
</div>
<ul className="list achievements-placeholder__blur">
{achievementsPlaceholder.map((achievement, index) => (
<li key={index}>
{achievementsPlaceholder.map((achievement) => (
<li key={achievement.name}>
<div className="list__item">
<img
className={`list__item-image achievements-placeholder__blur ${