diff --git a/src/main/events/library/add-custom-game-to-library.ts b/src/main/events/library/add-custom-game-to-library.ts index 414b3a4d..64c1b57c 100644 --- a/src/main/events/library/add-custom-game-to-library.ts +++ b/src/main/events/library/add-custom-game-to-library.ts @@ -1,6 +1,6 @@ import { registerEvent } from "../register-event"; import { gamesSublevel, gamesShopAssetsSublevel, levelKeys } from "@main/level"; -import { randomUUID } from "crypto"; +import { randomUUID } from "node:crypto"; import type { GameShop } from "@types"; const addCustomGameToLibrary = async ( diff --git a/src/main/events/library/cleanup-unused-assets.ts b/src/main/events/library/cleanup-unused-assets.ts index 22490c07..8f7e63d7 100644 --- a/src/main/events/library/cleanup-unused-assets.ts +++ b/src/main/events/library/cleanup-unused-assets.ts @@ -1,6 +1,6 @@ import { ipcMain } from "electron"; -import fs from "fs"; -import path from "path"; +import fs from "node:fs"; +import path from "node:path"; import { ASSETS_PATH } from "@main/constants"; const getCustomGamesAssetsPath = () => { diff --git a/src/main/events/library/copy-custom-game-asset.ts b/src/main/events/library/copy-custom-game-asset.ts index 07c3d6f7..a2f9bae4 100644 --- a/src/main/events/library/copy-custom-game-asset.ts +++ b/src/main/events/library/copy-custom-game-asset.ts @@ -1,7 +1,7 @@ import { registerEvent } from "../register-event"; import fs from "node:fs"; import path from "node:path"; -import { randomUUID } from "crypto"; +import { randomUUID } from "node:crypto"; import { ASSETS_PATH } from "@main/constants"; const copyCustomGameAsset = async ( diff --git a/src/main/events/user/get-user-library.ts b/src/main/events/user/get-user-library.ts index a8cca461..00922b9a 100644 --- a/src/main/events/user/get-user-library.ts +++ b/src/main/events/user/get-user-library.ts @@ -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(url).catch(() => null); }; diff --git a/src/renderer/src/pages/game-details/hero/hero-panel-actions.tsx b/src/renderer/src/pages/game-details/hero/hero-panel-actions.tsx index db0891ac..bdc8cf83 100644 --- a/src/renderer/src/pages/game-details/hero/hero-panel-actions.tsx +++ b/src/renderer/src/pages/game-details/hero/hero-panel-actions.tsx @@ -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";