[checkoutPanel]

1. checkout api 로직 변경
2. summaryContainer 데이터 연동 및 가격 시각화 작업

[DetailPanel]
1. SingleOption - useCallback 의존성 배열 추가
This commit is contained in:
hyunwoo93.cha
2024-04-01 18:52:51 +09:00
parent 72e0dc3836
commit 67ebfae088
7 changed files with 155 additions and 96 deletions

View File

@@ -1,7 +1,8 @@
import React from "react";
import React, { useCallback, useEffect } from "react";
import { useDispatch } from "react-redux";
import { useDispatch, useSelector } from "react-redux";
import { getMyInfoCheckoutInfo } from "../../actions/checkoutActions";
import { popPanel } from "../../actions/panelActions";
import TBody from "../../components/TBody/TBody";
import THeader from "../../components/THeader/THeader";
@@ -13,10 +14,32 @@ import SummaryContainer from "./container/SummaryCotainer";
export default function CheckOutPanel() {
const dispatch = useDispatch();
const { userInfo } = useSelector(
(state) => state.common.appStatus.loginUserData
);
const panelInfo = useSelector((state) => state.panels.panels);
const onBackClick = () => {
useEffect(() => {
dispatch(
getMyInfoCheckoutInfo({
mbrNo: userInfo,
dirPurcSelYn: "Y",
cartList: [
{
patnrId: "11",
prdtId: "7280567",
prodOptCdCval: "7326492",
prodQty: 1,
},
],
})
);
}, [dispatch]);
const onBackClick = useCallback(() => {
dispatch(popPanel());
};
}, [dispatch]);
return (
<TPanel isTabActivated={false}>
<THeader