From d0a3f8b60d578e7c73472edf91af7c8eaf153e5f Mon Sep 17 00:00:00 2001 From: Johnson Mao Date: Sat, 2 Nov 2024 20:44:33 +0800 Subject: [PATCH] chore: search bar send alert --- pages/index.tsx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pages/index.tsx b/pages/index.tsx index 598a11de..49a84022 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -5,6 +5,7 @@ import { serverSideTranslations } from "next-i18next/serverSideTranslations"; import CarouselV2 from "@/components/shared/Carousel/v2"; import SearchBar from "@/components/shared/SearchBar"; import Tabs, { TabItemType } from "@/components/shared/Tabs"; +import { useToast } from "@/components/shared/Toast"; import { GameType, getAllGamesEndpoint } from "@/requests/games"; import useRequest from "@/hooks/useRequest"; import { CarouselItemProps } from "@/components/shared/Carousel/v2/Carousel.type"; @@ -73,6 +74,7 @@ const TabPaneContent = ({ export default function Home() { const { fetch } = useRequest(); + const toast = useToast(); const [gameList, setGameList] = useState([]); useEffect(() => { @@ -83,6 +85,12 @@ export default function Home() {
+ toast( + { children: "此功能暫未實現", state: "warning" }, + { position: "top" } + ) + } leftSlot={