🔧 Fixing the AirDCPP socket issue on AcquisitionPanel on ComicDetails page
This commit is contained in:
@@ -10,12 +10,14 @@ export const AirDCPPHubsForm = (airDCPPClientUserSettings): ReactElement => {
|
||||
const dispatch = useDispatch();
|
||||
const [hubList, setHubList] = useState([]);
|
||||
const airDCPPConfiguration = useContext(AirDCPPSocketContext);
|
||||
const { AirDCPPSocket, settings } = airDCPPConfiguration;
|
||||
const {
|
||||
airDCPPState: { settings, socket },
|
||||
} = airDCPPConfiguration;
|
||||
|
||||
useEffect(() => {
|
||||
(async () => {
|
||||
if (!isEmpty(settings)) {
|
||||
const hubs = await AirDCPPSocket.get(`hubs`);
|
||||
const hubs = await socket.get(`hubs`);
|
||||
const hubSelectionOptions = hubs.map(({ hub_url, identity }) => ({
|
||||
value: hub_url,
|
||||
label: identity.name,
|
||||
|
||||
@@ -27,7 +27,9 @@ export const AirDCPPSettingsForm = (): ReactElement => {
|
||||
}, []);
|
||||
const validate = async () => {};
|
||||
console.log(airDCPPSettings.airDCPPState);
|
||||
const initFormData = !isUndefined(airDCPPSettings.airDCPPState.settings.directConnect)
|
||||
const initFormData = !isUndefined(
|
||||
airDCPPSettings.airDCPPState.settings.directConnect,
|
||||
)
|
||||
? airDCPPSettings.airDCPPState.settings.directConnect.client.host
|
||||
: {};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user