diff --git a/src/components/Search/SearchModal.tsx b/src/components/Search/SearchModal.tsx index 7c8fe60e5..50f91f4ca 100644 --- a/src/components/Search/SearchModal.tsx +++ b/src/components/Search/SearchModal.tsx @@ -232,28 +232,23 @@ function SearchModalBody( {!state.ask || !withAsk ? ( - <> - { - onChangeQuery({ - ask: true, - query: state.query, - global: state.global, - }); - }} - onClose={onClose} - > - {parent && state.query ? ( - - ) : null} - - + { + onChangeQuery({ + ask: true, + query: state.query, + global: state.global, + }); + }} + > + {parent && state.query ? : null} + ) : null} {state.query && state.ask && withAsk ? ( diff --git a/src/components/Search/SearchResults.tsx b/src/components/Search/SearchResults.tsx index fbf59528f..113a390b0 100644 --- a/src/components/Search/SearchResults.tsx +++ b/src/components/Search/SearchResults.tsx @@ -43,11 +43,10 @@ export const SearchResults = React.forwardRef(function SearchResults( parent: Site | Collection | null; withAsk: boolean; onSwitchToAsk: () => void; - onClose: (to?: string) => void; }, ref: React.Ref, ) { - const { children, query, spaceId, revisionId, parent, withAsk, onSwitchToAsk, onClose } = props; + const { children, query, spaceId, revisionId, parent, withAsk, onSwitchToAsk } = props; const language = useLanguage(); const debounceTimeout = React.useRef(null); @@ -251,7 +250,6 @@ export const SearchResults = React.forwardRef(function SearchResults( query={query} item={item} active={index === cursor} - onClick={onClose} /> ); } diff --git a/src/components/Search/SearchSectionResultItem.tsx b/src/components/Search/SearchSectionResultItem.tsx index dfc3efbe0..b620a7651 100644 --- a/src/components/Search/SearchSectionResultItem.tsx +++ b/src/components/Search/SearchSectionResultItem.tsx @@ -11,20 +11,15 @@ export const SearchSectionResultItem = React.forwardRef(function SearchSectionRe query: string; item: ComputedSectionResult; active: boolean; - onClick: (to: string) => void; }, ref: React.Ref, ) { - const { query, item, active, onClick } = props; + const { query, item, active } = props; return ( { - event.preventDefault(); - onClick(item.href); - }} className={tcls( 'search-section-result-item', '[&:has(+:not(&))]:mb-6',