Skip to content

Commit

Permalink
[React@18] fix incorrect useEffect return value (#195421)
Browse files Browse the repository at this point in the history
  • Loading branch information
Dosant authored Oct 8, 2024
1 parent e1cf8d5 commit d03537f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ export const ElasticsearchGuide = () => {
const { data } = useValues(FetchApiKeysAPILogic);
const apiKeys = data?.api_keys || [];

useEffect(() => makeRequest({}), []);
useEffect(() => {
makeRequest({});
}, []);

return (
<EnterpriseSearchElasticsearchPageTemplate>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ export const ApiKeyPanel: React.FC = () => {
const [isFlyoutOpen, setIsFlyoutOpen] = useState(false);
const elasticsearchEndpoint = esConfig.elasticsearch_host;

useEffect(() => makeRequest({}), []);
useEffect(() => {
makeRequest({});
}, []);

const apiKeys = data?.api_keys || [];
const cloudId = cloud?.cloudId;
Expand Down

0 comments on commit d03537f

Please sign in to comment.