File tree Expand file tree Collapse file tree 2 files changed +8
-9
lines changed
src/Elastic.Documentation.Site/Assets/web-components/SearchOrAskAi Expand file tree Collapse file tree 2 files changed +8
-9
lines changed Original file line number Diff line number Diff line change 22import '../../eui-icons-cache'
33import { useModalActions , useModalIsOpen } from './modal.store'
44import { useSearchActions , useSearchTerm } from './search.store'
5+ import { useSyncSearchParams } from './useSyncURLSearchParams'
56import {
67 EuiButton ,
78 EuiPortal ,
@@ -15,7 +16,6 @@ import {
1516import { css } from '@emotion/react'
1617import * as React from 'react'
1718import { useEffect , Suspense , lazy } from 'react'
18- import { useSyncSearchParams } from "./useSyncURLSearchParams" ;
1919
2020// Lazy load the modal component
2121const SearchOrAskAiModal = lazy ( ( ) =>
@@ -26,12 +26,11 @@ const SearchOrAskAiModal = lazy(() =>
2626
2727export const SearchOrAskAiButton = ( ) => {
2828 const searchTerm = useSearchTerm ( )
29- const { clearSearchTerm } =
30- useSearchActions ( )
29+ const { clearSearchTerm } = useSearchActions ( )
3130 const isModalOpen = useModalIsOpen ( )
3231 const { openModal, closeModal, toggleModal } = useModalActions ( )
33-
34- useSyncSearchParams ( ) ;
32+
33+ useSyncSearchParams ( )
3534
3635 const positionCss = css `
3736 position : absolute;
Original file line number Diff line number Diff line change 1- import { useEffect , useState } from "react" ;
2- import { useSearchActions , useSearchTerm } from " ./search.store" ;
3- import { useModalActions } from "./modal.store" ;
1+ import { useModalActions } from './modal.store'
2+ import { useSearchActions , useSearchTerm } from ' ./search.store'
3+ import { useEffect , useState } from 'react'
44
55export const useSyncSearchParams = ( ) => {
66 const searchTerm = useSearchTerm ( )
@@ -38,4 +38,4 @@ export const useSyncSearchParams = () => {
3838 openModal ( )
3939 }
4040 } , [ ] )
41- } ;
41+ }
You can’t perform that action at this time.
0 commit comments