-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feat/select application btn adjustments (#91)
* Fix application selection btn * Search applications
- Loading branch information
Showing
8 changed files
with
120 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
web/components/Account/Application/Place/ApplicationsSearch.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import { Box, Input, InputGroup, InputRightElement } from '@chakra-ui/react' | ||
import { useTranslation } from 'next-i18next' | ||
import { useRouter } from 'next/router' | ||
import SearchIcon from '~public/assets/icons/SearchIcon' | ||
|
||
const ApplicationsSearch = () => { | ||
const { t } = useTranslation('application') | ||
const router = useRouter() | ||
|
||
const handleSearch = (value) => { | ||
router.push( | ||
{ | ||
pathname: router.pathname, | ||
query: { ...router.query, search: value }, | ||
}, | ||
undefined, | ||
{ shallow: true }, | ||
) | ||
} | ||
|
||
return ( | ||
<Box p={4}> | ||
<InputGroup> | ||
<Input | ||
placeholder={t('place.search')} | ||
onChange={(e) => handleSearch(e.target.value)} | ||
width="auto" | ||
p={2} | ||
/> | ||
<InputRightElement> | ||
<SearchIcon /> | ||
</InputRightElement> | ||
</InputGroup> | ||
</Box> | ||
) | ||
} | ||
|
||
export default ApplicationsSearch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
const SearchIcon = ({ stroke = '#626782' }) => ( | ||
<svg | ||
width="13" | ||
height="13" | ||
viewBox="0 0 13 13" | ||
fill="none" | ||
xmlns="http://www.w3.org/2000/svg" | ||
> | ||
<g clip-path="url(#clip0_2226_6860)"> | ||
<path | ||
d="M12.1902 12.1876L8.75391 8.75122" | ||
stroke={stroke} | ||
strokeMiterlimit="10" | ||
strokeLinecap="square" | ||
/> | ||
<path | ||
d="M5.6888 10.0209C8.08204 10.0209 10.0221 8.08075 10.0221 5.68752C10.0221 3.29429 8.08204 1.35419 5.6888 1.35419C3.29557 1.35419 1.35547 3.29429 1.35547 5.68752C1.35547 8.08075 3.29557 10.0209 5.6888 10.0209Z" | ||
stroke={stroke} | ||
strokeMiterlimit="10" | ||
strokeLinecap="square" | ||
/> | ||
</g> | ||
<defs> | ||
<clipPath id="clip0_2226_6860"> | ||
<rect width="13" height="13" fill="white" /> | ||
</clipPath> | ||
</defs> | ||
</svg> | ||
) | ||
|
||
export default SearchIcon |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters