🐯 Mocked a prowlarr call
This commit is contained in:
BIN
screenshots/CVMatching.png
Normal file
BIN
screenshots/CVMatching.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.2 MiB |
BIN
screenshots/ComicDetail.png
Normal file
BIN
screenshots/ComicDetail.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 976 KiB |
BIN
screenshots/DC++Searching.png
Normal file
BIN
screenshots/DC++Searching.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.1 MiB |
BIN
screenshots/Dashboard.png
Normal file
BIN
screenshots/Dashboard.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 18 MiB |
BIN
screenshots/Import.png
Normal file
BIN
screenshots/Import.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 586 KiB |
BIN
screenshots/Library.png
Normal file
BIN
screenshots/Library.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.5 MiB |
@@ -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">
|
||||
|
||||
@@ -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>,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user