fix: medium issues fix

This commit is contained in:
Moyasee
2025-09-24 14:43:29 +03:00
parent f9d51ed33d
commit a869902cfb
2 changed files with 8 additions and 2 deletions

View File

@@ -19,7 +19,8 @@ const getUserLibrary = async (
}
const queryString = params.toString();
const url = `/users/${userId}/library${queryString ? `?${queryString}` : ""}`;
const baseUrl = `/users/${userId}/library`;
const url = queryString ? `${baseUrl}?${queryString}` : baseUrl;
return HydraApi.get<UserLibraryResponse>(url).catch(() => null);
};

View File

@@ -9,7 +9,12 @@ import {
PlusCircleIcon,
} from "@primer/octicons-react";
import { Button } from "@renderer/components";
import { useDownload, useLibrary, useToast, useUserDetails } from "@renderer/hooks";
import {
useDownload,
useLibrary,
useToast,
useUserDetails,
} from "@renderer/hooks";
import { useContext, useState } from "react";
import { useTranslation } from "react-i18next";
import { gameDetailsContext } from "@renderer/context";