diff --git a/src/entities/common/model/types.ts b/src/entities/common/model/types.ts index 99fad27..eac29ac 100644 --- a/src/entities/common/model/types.ts +++ b/src/entities/common/model/types.ts @@ -77,6 +77,7 @@ export interface HeaderNavigationProps { setMenuOn: (menuOn: boolean) => void; favoriteEdit?: boolean; loginSuccess: boolean; + setMid: (mid: string) => void; }; export interface FooterProps { diff --git a/src/widgets/navigation/header.tsx b/src/widgets/navigation/header.tsx index f1798fc..b42c4b1 100644 --- a/src/widgets/navigation/header.tsx +++ b/src/widgets/navigation/header.tsx @@ -19,7 +19,8 @@ export const HeaderNavigation = ({ headerType, setMenuOn, favoriteEdit, - loginSuccess + loginSuccess, + setMid }: HeaderNavigationProps) => { const { mutateAsync: appAlarmUnreadCount } = useAppAlarmUnreadCountMutation(); @@ -53,6 +54,7 @@ export const HeaderNavigation = ({ const onChangeToMid = (e: ChangeEvent) => { let value = e.target.value; useStore.getState().UserStore.setMid(value); + setMid(value); }; const callAlarmCount = () => { diff --git a/src/widgets/sub-layout/index.tsx b/src/widgets/sub-layout/index.tsx index 02eee11..e533f6b 100644 --- a/src/widgets/sub-layout/index.tsx +++ b/src/widgets/sub-layout/index.tsx @@ -327,7 +327,7 @@ export const SubLayout = () => { }, []); useEffect(() => { if(!!mid){ - callBusinessProperty(); + // callBusinessProperty(); callFindAuthMethod(); } }, [mid]); @@ -344,6 +344,7 @@ export const SubLayout = () => { favoriteEdit={ favoriteEdit } key={ headerNavigationKey } loginSuccess={ loginSuccess } + setMid={ setMid } /> { loginSuccess &&