fix: docs search box closing too fast (#417)

This commit is contained in:
Daniel Lautzenheiser 2023-01-23 14:43:54 -05:00 committed by GitHub
parent d17378d557
commit 0fd6f823d9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 13 deletions

View File

@ -99,7 +99,7 @@ const SearchModal: FC<SearchModalProps> = ({ open, onClose, searchablePages }) =
setCanFocus(true);
setTimeout(() => {
onClose();
});
}, 100);
}, [onClose]);
const handleSearchChange = useCallback((event: ChangeEvent<HTMLInputElement>) => {

View File

@ -58,24 +58,12 @@ interface SearchResultProps {
const SearchResult = ({ entry: { url, title }, summary, onClick }: SearchResultProps) => {
const theme = useTheme();
// const Icon = useMemo(() => {
// switch (type) {
// case NEWS:
// return ArticleIcon;
// case BULLETIN:
// return NewspaperIcon;
// default:
// return WebIcon;
// }
// }, [type]);
return (
<Button
component={Link}
href={url}
key={`result-${url}`}
onClick={onClick}
// startIcon={<Icon fontSize="large" />}
sx={{
display: 'flex',
alignItems: 'flex-start',