Skip to content
This repository was archived by the owner on May 13, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions src/features/Apiexplorer/RequestResponseRenderer/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useState, useCallback, useEffect } from 'react';
import React, { useState, useCallback } from 'react';
import { TSocketEndpointNames, TSocketRequestProps } from '@site/src/configs/websocket/types';
import { Button } from '@deriv/ui';
import useWS from '@site/src/hooks/useWs';
Expand Down Expand Up @@ -33,8 +33,6 @@ function RequestResponseRenderer<T extends TSocketEndpointNames>({
try {
request_data = JSON.parse(reqData);
} catch (error) {
console.error('Could not parse the JSON data while trying to send the request: ', error);
console.log(error);
setIsNotValid(true);
setToggleModal(false);
}
Expand Down
10 changes: 4 additions & 6 deletions src/hooks/useDynamicImportJSON/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,17 +54,15 @@ const useDynamicImportJSON = () => {
.then((data) => {
setRequestInfo(data);
})
.catch((error) => {
// eslint-disable-next-line
console.error(error);
.catch(() => {
setRequestInfo({});
});
import(`../../../config/v3/${selected_value}/receive.json`)
.then((data) => {
setResponseInfo(data);
})
.catch((error) => {
// eslint-disable-next-line
console.error(error);
.catch(() => {
setResponseInfo({});
});
},
[setRequestInfo, setResponseInfo],
Expand Down