mypage 2depts menu mapping
This commit is contained in:
@@ -19,20 +19,22 @@ import TermsOfService from "./MyPageSub/TermsOfService/TermsOfService";
|
||||
export default function MyPagePanel({ panelInfo, isOnTop, spotlightId }) {
|
||||
const { sendLogGNB } = useLogService();
|
||||
|
||||
const { menuNm, menuOrd } = panelInfo || {};
|
||||
const { menuNm, menuOrd, menuId } = panelInfo || {};
|
||||
const { getScrollTo, scrollTop } = useScrollTo();
|
||||
|
||||
const myPageComponents = {
|
||||
"My Info": MyInfo,
|
||||
"My Orders": MyOrders,
|
||||
"Recently Viewed": RecentlyViewed,
|
||||
Favorites: Favorites,
|
||||
Reminders: Reminders,
|
||||
Support: Support,
|
||||
"Terms of Service": TermsOfService,
|
||||
30800: MyInfo,
|
||||
30900: MyOrders,
|
||||
30300: RecentlyViewed,
|
||||
30200: Favorites,
|
||||
30400: Reminders,
|
||||
30500: Support,
|
||||
30600: TermsOfService,
|
||||
};
|
||||
|
||||
const SelectedComponent = menuNm && myPageComponents[menuNm];
|
||||
const SelectedComponent = menuId && myPageComponents[menuId];
|
||||
|
||||
console.log("chw", panelInfo);
|
||||
|
||||
useEffect(() => {
|
||||
const node = document.querySelector(`[id="${SpotlightIds.TBODY}"]`);
|
||||
|
||||
Reference in New Issue
Block a user