Skip to content

Commit

Permalink
BugFix/fix search drawer ui (#350)
Browse files Browse the repository at this point in the history
* feat: search bar new ui

* feat: mobile search

* chore: define new engine

* fix: fix searcg drawer ui

* fix: fix drawer ui

* fix: fix filter reset

---------

Co-authored-by: Pjaijai <paul6a24@hotmail.com>
  • Loading branch information
Pjaijai and pauljaijai committed Apr 9, 2024
1 parent 3e156ef commit 1f4db73
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 14 deletions.
16 changes: 4 additions & 12 deletions client/components/customized-ui/drawers/search.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,7 @@ import useProvinceOptions from "@/hooks/common/options/province-options"
import usePostSortOptions from "@/hooks/common/sort/post-sort-options"
import useReferralSortOptions from "@/hooks/common/sort/referral-sort-options"
import { Button } from "@/components/ui/button"
import {
Drawer,
DrawerContent,
DrawerHeader,
DrawerTitle,
DrawerTrigger,
} from "@/components/ui/drawer"
import { Drawer, DrawerContent, DrawerTrigger } from "@/components/ui/drawer"
import { Input } from "@/components/ui/input"
import { ISearchSearchBarProps } from "@/components/customized-ui/bars/search"
import ResetButton from "@/components/customized-ui/buttons/reset"
Expand Down Expand Up @@ -75,7 +69,7 @@ const SearchDrawer: React.FunctionComponent<ISearchDrawerProps> = ({
{t("general.filter")}
</div>
</DrawerTrigger>
<DrawerContent className="fixed inset-x-0 bottom-0 mt-24 flex h-[85%] flex-col rounded-t-[10px]">
<DrawerContent className="fixed bottom-0 flex h-fit flex-col rounded-t-[10px] p-2">
<div className="container mt-2 flex flex-col gap-4">
<Input
onChange={handleCompanyChange}
Expand Down Expand Up @@ -155,11 +149,9 @@ const SearchDrawer: React.FunctionComponent<ISearchDrawerProps> = ({
triggerClassName="w-full"
/>
</div>
<div className="flex w-full flex-col justify-end gap-2 p-4">
<div className="mt-4 flex w-full flex-col justify-end gap-2 px-8">
<ResetButton onClick={handleReset} />
<Button onClick={handleSearchSubmit} className="whitespace-nowrap">
{t("general.search")}
</Button>
<Button onClick={handleSearchSubmit}>{t("general.search")}</Button>
</div>
</DrawerContent>
</Drawer>
Expand Down
2 changes: 1 addition & 1 deletion client/hooks/api/post/search-post.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ const useSearchPost = (props: ISearchPostProps) => {
const handleReset = () => {
setCompanyName("")
setJobTitle("")
setCountryUuid(undefined)
setCountryUuid("all")
setProvinceUuid(undefined)
setCityUuid(undefined)
setIndustryUuid(undefined)
Expand Down
2 changes: 1 addition & 1 deletion client/hooks/api/referral/search-referral.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ const useSearchReferral = (props: ISearchReferralProps) => {
const handleReset = () => {
setCompanyName("")
setJobTitle("")
setCountryUuid(undefined)
setCountryUuid("all")
setProvinceUuid(undefined)
setCityUuid(undefined)
setIndustryUuid(undefined)
Expand Down

0 comments on commit 1f4db73

Please sign in to comment.