diff --git a/src/pages/PaymentPage/PaymentPage.jsx b/src/pages/PaymentPage/PaymentPage.jsx index bd7bee3..a36c7f4 100644 --- a/src/pages/PaymentPage/PaymentPage.jsx +++ b/src/pages/PaymentPage/PaymentPage.jsx @@ -98,7 +98,6 @@ const PaymentPage = () => { withCredentials: true, }) .then((res) => { - const paymentWidget = paymentWidgetRef.current; // ------ '결제하기' 버튼 누르면 결제창 띄우기 ------ @@ -264,7 +263,6 @@ const PaymentPage = () => { 총 결제 금액 {paymentData?.totalPrice && - salePrice && (paymentData.totalPrice - salePrice) .toString() .replace(/\B(?=(\d{3})+(?!\d))/g, ",") + "원"} diff --git a/src/pages/PaymentPage/Redirect/PaymentRedirectPage.css b/src/pages/PaymentPage/Redirect/PaymentRedirectPage.css index 24eb36c..f93cc33 100644 --- a/src/pages/PaymentPage/Redirect/PaymentRedirectPage.css +++ b/src/pages/PaymentPage/Redirect/PaymentRedirectPage.css @@ -8,7 +8,7 @@ .payment-redirect-page__berry { display: flex; - margin-top: 16.75rem; + margin-top: 10.75rem; margin-left: auto; margin-right: auto; } diff --git a/src/pages/StoreDetailPage/StoreDetailPage.jsx b/src/pages/StoreDetailPage/StoreDetailPage.jsx index 19227f8..f93e4b5 100644 --- a/src/pages/StoreDetailPage/StoreDetailPage.jsx +++ b/src/pages/StoreDetailPage/StoreDetailPage.jsx @@ -12,6 +12,8 @@ const StoreDetailPage = () => { const storeId = params.get("storeId"); const inout = params.get("inout"); const apiRoot = process.env.REACT_APP_API_ROOT; + // const scrollRef = useRef(); + // const [isScrollable, setIsScrollable] = useState(false); const [caffeeInfo, setCaffeeInfo] = useState(null); const [selectedCategory, setSelectedCategory] = useState([]); const [menu, setMenu] = useState(null); @@ -94,6 +96,41 @@ const StoreDetailPage = () => { // eslint-disable-next-line react-hooks/exhaustive-deps }, []); + // useEffect(() => { + // const currentRef = scrollRef.current; + + // if (currentRef) { + // const handleScroll = () => { + // const scrollWidth = currentRef.scrollWidth; + // const clientWidth = currentRef.clientWidth; + // setIsScrollable(scrollWidth > clientWidth); + // }; + + // currentRef.addEventListener("scroll", handleScroll); + + // // 컴포넌트가 언마운트될 때 이벤트 리스너 제거 + // return () => { + // if (currentRef) { + // currentRef.removeEventListener("scroll", handleScroll); + // } + // }; + // } + // }, []); + + // const handleGoLeft = () => { + // if (scrollRef.current) { + // // 스크롤을 왼쪽으로 100px 이동 + // scrollRef.current.scrollLeft -= 100; + // } + // }; + + // const handleGoRight = () => { + // if (scrollRef.current) { + // // 스크롤을 오른쪽으로 100px 이동 + // scrollRef.current.scrollLeft += 100; + // } + // }; + return (
{ src={goLeft} alt="L" className="store-detail-page__menuCategory__go-left" + // onClick={handleGoLeft} /> +
{menu && menu.menu && Array.isArray(menu.menu) ? ( menu.menu.map((category, index) => ( @@ -180,10 +219,12 @@ const StoreDetailPage = () => {

Loading category...

)}
+ R