diff --git a/src/components/UI/search/Search.tsx b/src/components/UI/search/Search.tsx index 075de7cf37..7b8ad0c3c1 100644 --- a/src/components/UI/search/Search.tsx +++ b/src/components/UI/search/Search.tsx @@ -1,5 +1,5 @@ import { FC, useState } from 'react'; -import { Input, InputGroup, Link, Stack } from '@chakra-ui/react'; +import { Button, Input, InputGroup, Stack } from '@chakra-ui/react'; import { BORDER_WIDTH } from '../../../constants'; import { LensIcon } from '../icons'; @@ -8,12 +8,6 @@ export const Search: FC = () => { const [query, setQuery] = useState(''); // Handlers - const handleSubmit = (e: React.FormEvent): void => { - document.getElementById('search-link')?.click(); - }; - const handleKeyPress = (e: React.KeyboardEvent): void => { - if (e.key === 'Enter') handleSubmit(e); - }; const handleChange = (e: React.ChangeEvent): void => { setQuery(e.target.value); }; @@ -24,33 +18,41 @@ export const Search: FC = () => { borderRight={{ base: 'none', md: BORDER_WIDTH }} borderColor={{ base: 'bg', md: 'primary' }} _hover={{ base: { bg: 'primary' }, md: { bg: 'none' } }} - > - - - - - - + > +
+ + + + + +
); };