|
@@ -1,6 +1,7 @@
|
|
|
"use client";
|
|
|
import { GameListRep, searchGameListApi, SearchProps } from "@/api/home";
|
|
|
import GroupCard from "@/components/Card/GroupCard";
|
|
|
+import { useRouter } from "@/i18n/routing";
|
|
|
import { useSearchStore } from "@/stores/useSearchStore";
|
|
|
import { Button, createErrorBlock, Mask, SearchBar } from "antd-mobile";
|
|
|
import { useTranslations } from "next-intl";
|
|
@@ -176,24 +177,27 @@ const Content: FC<ContentProps> = (props) => {
|
|
|
);
|
|
|
};
|
|
|
const HomeSearch: FC<PropsWithChildren<Props>> = (props) => {
|
|
|
+ const router = useRouter();
|
|
|
+
|
|
|
const t = useTranslations("HomePage");
|
|
|
const [visible, setVisible] = useState(false);
|
|
|
const handler = () => {
|
|
|
- setVisible(true);
|
|
|
+ router.push("/search");
|
|
|
};
|
|
|
return (
|
|
|
<>
|
|
|
<div
|
|
|
onClick={handler}
|
|
|
className={
|
|
|
- "flex items-center rounded-[0.03rem] bg-[url(/home/search.webp)] bg-[length:100%_100%] py-[12px]" +
|
|
|
- " rounded-[0.05rem] px-[10px] text-[#6e6e6e]"
|
|
|
+ "flex items-center rounded-[0.03rem] rounded-[0.15rem] border border-[var(--primary-button)] px-[6px] py-[6px] text-[#6e6e6e]"
|
|
|
}
|
|
|
>
|
|
|
<i
|
|
|
- className={"iconfont icon-sousuo1 mr-[0.0833rem] text-[0.16rem] text-[#85e0ee]"}
|
|
|
+ className={
|
|
|
+ "iconfont icon-sousuo mr-[0.0833rem] text-[0.16rem] text-[var(--textColor1)]"
|
|
|
+ }
|
|
|
></i>
|
|
|
- <span className={"text-[0.12rem] text-[#85e0ee]"}>{t("search")}</span>
|
|
|
+ <span className={"text-[0.12rem] text-[var(--textColor1)]"}>{t("search")}</span>
|
|
|
</div>
|
|
|
<Mask visible={visible} opacity={0.9} getContainer={null}>
|
|
|
<Content closeHandler={() => setVisible(false)} />
|