Skip to content
This repository was archived by the owner on May 13, 2024. It is now read-only.

Commit c90562a

Browse files
Hubert KosterHubert Koster
authored andcommitted
chore: removing unecessary callback
1 parent 7cbebfb commit c90562a

File tree

1 file changed

+6
-9
lines changed
  • src/features/Apiexplorer/RequestResponseRenderer/PlaygroundSection/JsonData

1 file changed

+6
-9
lines changed

src/features/Apiexplorer/RequestResponseRenderer/PlaygroundSection/JsonData/index.tsx

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { useCallback } from 'react';
1+
import React from 'react';
22
import styles from './JsonData.module.scss';
33
import {
44
TSocketResponseData,
@@ -19,14 +19,11 @@ const JsonData = <T extends TSocketEndpointNames | TSocketSubscribableEndpointNa
1919
name,
2020
error,
2121
}: TJsonData<T>) => {
22-
const getResponse = useCallback(
23-
(key: string) => {
24-
const response = full_response;
25-
const selected_key = response[key] ?? name;
26-
if (response !== null) return selected_key;
27-
},
28-
[full_response],
29-
);
22+
const getResponse = (key: string) => {
23+
const response = full_response;
24+
const selected_key = response[key] ?? name;
25+
if (response !== null) return selected_key;
26+
};
3027

3128
const key = getResponse('msg_type');
3229
const echo_req_json = {

0 commit comments

Comments
 (0)