|
|
@@ -1,5 +1,5 @@
|
|
|
"use client";
|
|
|
-import { useState, useEffect, useMemo } from "react";
|
|
|
+import { useState, useMemo } from "react";
|
|
|
import { useForm, Controller, FormProvider } from "react-hook-form";
|
|
|
import { Swiper, SwiperSlide } from "swiper/react";
|
|
|
import { Autoplay } from "swiper/modules";
|
|
|
@@ -75,7 +75,7 @@ const WholesalePage = () => {
|
|
|
showToast(res.message, "danger");
|
|
|
}
|
|
|
} catch (err) {
|
|
|
- alert("Network error");
|
|
|
+ alert(err);
|
|
|
}
|
|
|
console.log("data-------------------------", JSON.stringify(data));
|
|
|
};
|
|
|
@@ -139,22 +139,6 @@ const WholesalePage = () => {
|
|
|
"https://www.asteriahair.com/media/wysiwyg/wholesale/1609817254.jpg",
|
|
|
"https://www.asteriahair.com/media/wysiwyg/wholesale/1609817256.jpg",
|
|
|
];
|
|
|
-
|
|
|
- // 引入 countries.js 脚本,执行 populateCountries
|
|
|
- useEffect(() => {
|
|
|
- const script = document.createElement("script");
|
|
|
- script.src = "/js/countries.js";
|
|
|
- script.async = true;
|
|
|
- script.onload = () => {
|
|
|
- // @ts-ignore
|
|
|
- populateCountries("country");
|
|
|
- };
|
|
|
- document.body.appendChild(script);
|
|
|
- return () => {
|
|
|
- document.body.removeChild(script);
|
|
|
- };
|
|
|
- }, []);
|
|
|
-
|
|
|
const arrowDefault =
|
|
|
"https://www.asteriahair.com/media/wysiwyg/wholesale/1685492905.png";
|
|
|
const arrowFlip =
|