change name in register & add link to most-searched home page & change tag & change design and responsive & fix active link header & must include field num in register & send code msg
This commit is contained in:
@@ -1,30 +1,11 @@
|
||||
import { Button, ButtonGroup, TextField } from "@mui/material";
|
||||
import SearchD from "@/components/icons/SearchD";
|
||||
import Link from "next/link";
|
||||
|
||||
import statesData from "@/data/state.json";
|
||||
import citiesData from "@/data/city.json";
|
||||
import Fields from "./Fields";
|
||||
import { getStateInfo } from "@/lib/getStateInfo";
|
||||
|
||||
// const provinceIdMap = Object.fromEntries(
|
||||
// statesData.map((state) => [state.name, state.id])
|
||||
// );
|
||||
// const citiesByProvinceId = citiesData.reduce((acc, city) => {
|
||||
// if (!acc[city.province_id]) acc[city.province_id] = [];
|
||||
// acc[city.province_id].push(city);
|
||||
// return acc;
|
||||
// }, {});
|
||||
|
||||
function SearchBar() {
|
||||
const { matchedCity, matchedState } = getStateInfo()
|
||||
|
||||
// const getDefaultCityForProvince = useCallback((provinceName) => {
|
||||
// if (!provinceName) return undefined;
|
||||
// const provinceId = provinceIdMap[provinceName];
|
||||
// return citiesByProvinceId[provinceId]?.[0]?.name;
|
||||
// }, []);
|
||||
|
||||
return (
|
||||
<ButtonGroup
|
||||
variant="contained"
|
||||
@@ -35,18 +16,6 @@ function SearchBar() {
|
||||
"
|
||||
>
|
||||
<Fields city={matchedCity} state={matchedState} />
|
||||
<Button
|
||||
className="!flex lg:!hidden !rounded-[4px]
|
||||
!w-[40px] sm:!w-[42px] md:!w-[45px] lg:!w-[48px]
|
||||
!h-[40px] sm:!h-[42px] md:!h-[45px] lg:!h-[48px]
|
||||
!min-w-[40px] sm:!min-w-[42px] md:!min-w-[45px] lg:!min-w-[48px]
|
||||
!min-h-[40px] sm:!min-h-[42px] md:!min-h-[45px] lg:!min-h-[48px]
|
||||
!gap-2.5 !p-2.5"
|
||||
>
|
||||
<div className="w-[24px] h-[24px] min-w-[24px] min-h-[24px]">
|
||||
<SearchD />
|
||||
</div>
|
||||
</Button>
|
||||
</ButtonGroup>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user