|
@@ -5,8 +5,13 @@ import { useTranslations } from "next-intl";
|
|
|
import { FC, PropsWithChildren, useState } from "react";
|
|
|
interface Props {}
|
|
|
|
|
|
-const Content: FC = () => {
|
|
|
+interface ContentProps {
|
|
|
+ closeHandler: () => void;
|
|
|
+}
|
|
|
+const Content: FC<ContentProps> = (props) => {
|
|
|
const t = useTranslations("HomePage");
|
|
|
+ const { closeHandler } = props;
|
|
|
+ const changeHandler = (value: string) => {};
|
|
|
|
|
|
// @ts-ignore
|
|
|
return (
|
|
@@ -20,13 +25,15 @@ const Content: FC = () => {
|
|
|
}}
|
|
|
placeholder={t("search")}
|
|
|
showCancelButton={() => true}
|
|
|
+ onChange={changeHandler}
|
|
|
+ onCancel={closeHandler}
|
|
|
/>
|
|
|
<div
|
|
|
className={
|
|
|
"h-[.5rem] text-center text-[0.12rem] text-[#6e6e6e]" + " leading-[.5rem]"
|
|
|
}
|
|
|
>
|
|
|
- A pesquisa requer pelo menos 3 caracteres
|
|
|
+ {t("searchTips")}
|
|
|
</div>
|
|
|
</section>
|
|
|
</Box>
|
|
@@ -52,7 +59,7 @@ const HomeSearch: FC<PropsWithChildren<Props>> = (props) => {
|
|
|
<span className={"text-[0.12rem]"}>{t("search")}</span>
|
|
|
</div>
|
|
|
<Mask visible={visible} opacity={0.9}>
|
|
|
- <Content />
|
|
|
+ <Content closeHandler={() => setVisible(false)} />
|
|
|
</Mask>
|
|
|
</>
|
|
|
);
|