🔧 Fix for react-refresh plugin in production
This commit is contained in:
@@ -266,11 +266,11 @@ export const getTransfers =
|
||||
true,
|
||||
);
|
||||
}
|
||||
const transfers = await ADCPPSocket.get("queue/bundles/1/50", {});
|
||||
if (!isNil(transfers)) {
|
||||
const bundles = await ADCPPSocket.get("queue/bundles/1/50", {});
|
||||
if (!isNil(bundles)) {
|
||||
dispatch({
|
||||
type: AIRDCPP_TRANSFERS_FETCHED,
|
||||
transfers,
|
||||
bundles,
|
||||
});
|
||||
}
|
||||
} catch (err) {
|
||||
|
||||
@@ -20,7 +20,7 @@ export const PullList = ({ issues }: PullListProps): ReactElement => {
|
||||
useEffect(() => {
|
||||
dispatch(
|
||||
getWeeklyPullList({
|
||||
startDate: "2022-6-1",
|
||||
startDate: "2022-6-18",
|
||||
pageSize: "15",
|
||||
currentPage: "1",
|
||||
}),
|
||||
|
||||
@@ -3,6 +3,7 @@ import { getTransfers } from "../../actions/airdcpp.actions";
|
||||
import { useDispatch, useSelector } from "react-redux";
|
||||
import { AirDCPPSocketContext } from "../../context/AirDCPPSocket";
|
||||
import { isEmpty, isUndefined } from "lodash";
|
||||
import { searchIssue } from "../../actions/fileops.actions";
|
||||
|
||||
interface IDownloadsProps {
|
||||
data: any;
|
||||
@@ -16,6 +17,22 @@ export const Downloads = (props: IDownloadsProps): ReactElement => {
|
||||
const AirDCPPTransfers = useSelector(
|
||||
(state: RootState) => state.airdcpp.transfers,
|
||||
);
|
||||
useEffect(() => {
|
||||
dispatch(
|
||||
searchIssue(
|
||||
{
|
||||
query: {},
|
||||
},
|
||||
{
|
||||
pagination: {
|
||||
size: 25,
|
||||
from: 0,
|
||||
},
|
||||
type: "wanted",
|
||||
},
|
||||
),
|
||||
);
|
||||
}, []);
|
||||
// Make the call to get all transfers from AirDC++
|
||||
useEffect(() => {
|
||||
if (!isUndefined(AirDCPPSocket) && !isEmpty(airDCPPConfiguration)) {
|
||||
|
||||
@@ -8,6 +8,7 @@ import App from "./components/App";
|
||||
|
||||
const rootEl = document.getElementById("root");
|
||||
const root = createRoot(rootEl);
|
||||
//In the entry of your indirect code path (e.g. some index.js), add the following two lines:
|
||||
|
||||
root.render(
|
||||
<Provider store={store}>
|
||||
|
||||
@@ -86,7 +86,7 @@ function airdcppReducer(state = initialState, action) {
|
||||
case AIRDCPP_TRANSFERS_FETCHED:
|
||||
return {
|
||||
...state,
|
||||
transfers: action.transfers,
|
||||
transfers: action.bundles,
|
||||
};
|
||||
case LOCATION_CHANGE:
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user