let url_Backend_dwinzo = `http://${process.env.REACT_APP_SERVER_MARKETPLACE_URL}`;

export const getAssetImages = async (cursor?: string) => {
    try {
        const response = await fetch(
            `${url_Backend_dwinzo}/api/v3/AssetDatas?limit=10${cursor ? `&cursor=${cursor}` : ""}`,
            {
                method: "GET",
                headers: {
                    "Content-Type": "application/json",
                },
            }
        );

        if (!response.ok) {
            throw new Error("Failed to fetch assets");
        }

        return await response.json();
    } catch (error: any) {
        throw new Error(error.message);
    }
};
