diff --git a/src/client/components/ComicDetail/AcquisitionPanel.tsx b/src/client/components/ComicDetail/AcquisitionPanel.tsx index 88c24d4..e21c01a 100644 --- a/src/client/components/ComicDetail/AcquisitionPanel.tsx +++ b/src/client/components/ComicDetail/AcquisitionPanel.tsx @@ -1,5 +1,4 @@ import React, { useCallback, ReactElement, useEffect, useState } from "react"; -import { getBundlesForComic, sleep } from "../../actions/airdcpp.actions"; import { SearchQuery, PriorityEnum, SearchResponse } from "threetwo-ui-typings"; import { RootState, SearchInstance } from "threetwo-ui-typings"; import ellipsize from "ellipsize"; @@ -12,7 +11,6 @@ import { useQuery, useQueryClient } from "@tanstack/react-query"; import axios from "axios"; import { AIRDCPP_SERVICE_BASE_URI } from "../../constants/endpoints"; - interface IAcquisitionPanelProps { query: any; comicObjectId: any; @@ -35,7 +33,7 @@ export const AcquisitionPanel = ( priority: PriorityEnum; } interface SearchResult { - id: string; + id: string; // Add other properties as needed slots: any; type: any; @@ -112,26 +110,20 @@ export const AcquisitionPanel = ( */ const search = async (searchData: any) => { setAirDCPPSearchResults([]); - socketIOInstance.emit( - "call", - "socket.search", - { - query: searchData, - config: { - protocol: `ws`, - hostname: `localhost:5600`, - username: `user`, - password: `pass`, - }, + socketIOInstance.emit("call", "socket.search", { + query: searchData, + config: { + protocol: `ws`, + hostname: `localhost:5600`, + username: `user`, + password: `pass`, }, - ); + }); }; socketIOInstance.on("searchResultAdded", ({ result }: any) => { setAirDCPPSearchResults((previousState) => { - const exists = previousState.some( - (item) => result.id === item.id, - ); + const exists = previousState.some((item) => result.id === item.id); if (!exists) { return [...previousState, result]; } @@ -205,7 +197,7 @@ export const AcquisitionPanel = ( search(manualQuery); }; - + return ( <>
- {type.id === "directory" ? ( - - ) : null} - {ellipsize(name, 70)} -
- -+ {type.id === "directory" ? ( + + ) : null} + {ellipsize(name, 70)} +
+ +