youmaylike 기능 수정 , DetailPanel css 수정

This commit is contained in:
고동영
2024-04-15 10:45:55 +09:00
parent 9f6e2ab51d
commit 612523eb85
13 changed files with 255 additions and 187 deletions

View File

@@ -35,12 +35,10 @@ export default function ItemDetail() {
);
const { httpHeader } = useSelector((state) => state.common);
console.log("#panels", panels);
const dispatch = useDispatch();
const getPanelInfo = () => {
if (panels) {
console.log("#getPanelInfo");
for (let i = 0; i < panels.length; i++) {
if (panels[i].name === "detailpanel") {
setSelectedPatnrId(panels[i].panelInfo.patnrId);
@@ -91,11 +89,11 @@ export default function ItemDetail() {
})
);
}
}, [dispatch, selectedPatnrId, selectedPrdtId, panels]);
}, [dispatch, selectedPatnrId, selectedPrdtId, panels, selectedIndex]);
const onClick = () => {
const onClick = useCallback(() => {
dispatch(popPanel());
};
}, [dispatch]);
useEffect(() => {
if (panels && selectedPatnrId && selectedPrdtId) {
@@ -192,7 +190,9 @@ export default function ItemDetail() {
/>
)}
</TBody>
{(selectedPrdtId || themeType === "theme") && <YouMayLike />}
{(selectedPrdtId || themeType === "theme") && (
<YouMayLike isUnable={productData?.pmtSuptYn === "N"} />
)}
</TPanel>
);
}