import { BannerRep } from "@/api/home";
import HomeNoticeBar from "@/app/[locale]/(TabBar)/[[...share]]/_home/HomeNoticeBar";
import { server } from "@/utils/server";
const getNotices = async () => {
    return server
        .request<BannerRep[]>({
            url: "/v1/api/front/marquee",
            method: "POST",
            body: JSON.stringify({}),
            next: { revalidate: 0 },
        })
        .then((res) => {
            if (res.code === 200) return res.data;
            return [];
        });
};
const Page = async () => {
    const notices = await getNotices();

    if (!notices.length) return null;
    return <HomeNoticeBar notices={notices} />;
};
export default Page;
