🐯 Mocked a prowlarr call

This commit is contained in:
2024-02-23 16:25:49 -05:00
parent 1b791d11ca
commit 62efc65c5b
8 changed files with 23 additions and 2 deletions

BIN
screenshots/CVMatching.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 MiB

BIN
screenshots/ComicDetail.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 976 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

BIN
screenshots/Dashboard.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 MiB

BIN
screenshots/Import.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 586 KiB

BIN
screenshots/Library.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 MiB

View File

@@ -3,8 +3,31 @@ import React, { useCallback, ReactElement, useEffect, useState } from "react";
import { useQuery, useQueryClient } from "@tanstack/react-query";
import axios from "axios";
import { Form, Field } from "react-final-form";
import { PROWLARR_SERVICE_BASE_URI } from "../../constants/endpoints";
export const TorrentSearchPanel = (props): ReactElement => {
const [prowlarrSettingsData, setProwlarrSettingsData] = useState({});
const { data } = useQuery({
queryFn: async () =>
axios({
url: `${PROWLARR_SERVICE_BASE_URI}/search`,
method: "POST",
data: {
port: "9696",
apiKey: "c4f42e265fb044dc81f7e88bd41c3367",
offset: 0,
categories: [7030],
query: "the darkness",
host: "localhost",
limit: 100,
type: "search",
indexerIds: [2],
},
}),
queryKey: ["prowlarrSettingsData"],
});
console.log(data?.data);
return (
<>
<div className="mt-5">

View File

@@ -8,7 +8,6 @@ import { ErrorPage } from "./components/shared/ErrorPage";
const rootEl = document.getElementById("root");
const root = createRoot(rootEl);
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
import { ReactQueryDevtools } from "@tanstack/react-query-devtools";
import Import from "./components/Import/Import";
import Dashboard from "./components/Dashboard/Dashboard";
import Search from "./components/Search/Search";
@@ -47,6 +46,5 @@ const router = createBrowserRouter([
root.render(
<QueryClientProvider client={queryClient}>
<RouterProvider router={router} />
<ReactQueryDevtools initialIsOpen={true} />
</QueryClientProvider>,
);