Skip to content

Commit 8eb5764

Browse files
committed
Run prettier
1 parent 9664275 commit 8eb5764

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

src/Elastic.Documentation.Site/Assets/web-components/SearchOrAskAi/SearchOrAskAiButton.tsx

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ import {
1313
EuiLoadingSpinner,
1414
} from '@elastic/eui'
1515
import { css } from '@emotion/react'
16+
import { useQuery } from '@tanstack/react-query'
1617
import * as React from 'react'
1718
import { useEffect, Suspense, lazy } from 'react'
18-
import { useQuery } from '@tanstack/react-query'
1919

2020
// Lazy load the modal component
2121
const SearchOrAskAiModal = lazy(() =>
@@ -29,16 +29,16 @@ export const SearchOrAskAiButton = () => {
2929
const { clearSearchTerm } = useSearchActions()
3030
const isModalOpen = useModalIsOpen()
3131
const { openModal, closeModal, toggleModal } = useModalActions()
32-
32+
3333
const { data: isApiAvailable } = useQuery({
34-
queryKey: ['api-health'],
35-
queryFn: async () => {
36-
const response = await fetch('/docs/_api/v1/', { method: 'HEAD' })
37-
return response.ok
38-
},
39-
staleTime: 5 * 60 * 1000, // 5 minutes
40-
retry: false
41-
})
34+
queryKey: ['api-health'],
35+
queryFn: async () => {
36+
const response = await fetch('/docs/_api/v1/', { method: 'HEAD' })
37+
return response.ok
38+
},
39+
staleTime: 5 * 60 * 1000, // 5 minutes
40+
retry: false,
41+
})
4242

4343
const positionCss = css`
4444
position: absolute;
@@ -72,7 +72,7 @@ export const SearchOrAskAiButton = () => {
7272
window.removeEventListener('keydown', handleKeydown)
7373
}
7474
}, [])
75-
75+
7676
if (!isApiAvailable) {
7777
return null
7878
}

0 commit comments

Comments
 (0)