diff --git a/x-pack/plugins/enterprise_search/public/applications/elasticsearch/components/elasticsearch_guide/elasticsearch_guide.tsx b/x-pack/plugins/enterprise_search/public/applications/elasticsearch/components/elasticsearch_guide/elasticsearch_guide.tsx index f89547b00c3cf..80a8de9acdc21 100644 --- a/x-pack/plugins/enterprise_search/public/applications/elasticsearch/components/elasticsearch_guide/elasticsearch_guide.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/elasticsearch/components/elasticsearch_guide/elasticsearch_guide.tsx @@ -35,7 +35,9 @@ export const ElasticsearchGuide = () => { const { data } = useValues(FetchApiKeysAPILogic); const apiKeys = data?.api_keys || []; - useEffect(() => makeRequest({}), []); + useEffect(() => { + makeRequest({}); + }, []); return ( diff --git a/x-pack/plugins/enterprise_search/public/applications/shared/api_key/api_key_panel.tsx b/x-pack/plugins/enterprise_search/public/applications/shared/api_key/api_key_panel.tsx index c5d1034f488d8..34c7ac66343c9 100644 --- a/x-pack/plugins/enterprise_search/public/applications/shared/api_key/api_key_panel.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/shared/api_key/api_key_panel.tsx @@ -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;