import { WithDrawType } from "@/api/withdraw";
import { server } from "@/utils/server";
import WithdrawWidget from "./WithdrawWidget";
// 获取提现配置列表
// POST /v1/api/user/user_withdraw_config
// 接口ID：222886924
// 接口地址：https://app.apifox.com/link/project/4790544/apis/api-222886924

const getWithdrawApi = async () => {
    return server
        .request<WithDrawType[]>({
            url: "/v1/api/user/user_withdraw_config",
            method: "post",
        })
        .then((res) => {
            if (res.code === 200) {
                return res.data;
            }
            return [];
        });
};

const Page = async () => {
    const data = await getWithdrawApi();
    return <WithdrawWidget channels={data} />;
};

export default Page;
