From c4bf3c931c276276e08f5b8fd42d4ff7937c305a Mon Sep 17 00:00:00 2001 From: josh-willis-arcadis <168561922+josh-willis-arcadis@users.noreply.github.com> Date: Fri, 15 Nov 2024 13:10:48 -0600 Subject: [PATCH] remove weird check --- .../form/advanced-settings-panel.tsx | 89 +++++++++---------- 1 file changed, 42 insertions(+), 47 deletions(-) diff --git a/lib/components/form/advanced-settings-panel.tsx b/lib/components/form/advanced-settings-panel.tsx index 99256c311..62e2e812c 100644 --- a/lib/components/form/advanced-settings-panel.tsx +++ b/lib/components/form/advanced-settings-panel.tsx @@ -179,7 +179,9 @@ const AdvancedSettingsPanel = ({ ) useEffect(() => { + console.log('mobilityProfile', mobilityProfile) if (mobilityProfile && dependents.length > 0) { + console.log('test') getDependentUserInfo(dependents, intl) } }, [dependents, getDependentUserInfo, intl, mobilityProfile]) @@ -251,16 +253,6 @@ const AdvancedSettingsPanel = ({ closePanel() }, [closePanel, setCloseAdvancedSettingsWithDelay]) - const showMobilityProfileDropdown = () => { - return ( - loggedInUser && - loggedInUser.mobilityProfile && - loggedInUser.mobilityProfile.mobilityMode && - loggedInUser.dependents && - loggedInUser.dependents.length > 0 - ) - } - return ( @@ -289,43 +281,45 @@ const AdvancedSettingsPanel = ({ )} - {showMobilityProfileDropdown() && loggedInUser && ( - - - - - ( - - {linkText} - - ) - }} - /> - { - setSelectedMobilityProfile(e.mobilityProfile as string) - }} - options={[ - { - text: 'Myself', - value: loggedInUser.mobilityProfile?.mobilityMode || '' - }, - ...(loggedInUser.dependentsInfo?.map((user) => ({ - text: user.name || user.email, - value: user.mobilityMode || '' - })) || []) - ]} - value={selectedMobilityProfile} - /> - - )} + {loggedInUser && + loggedInUser.dependentsInfo && + loggedInUser.dependentsInfo.length > 0 && ( + + + + + ( + + {linkText} + + ) + }} + /> + { + setSelectedMobilityProfile(e.mobilityProfile as string) + }} + options={[ + { + text: 'Myself', + value: loggedInUser.mobilityProfile?.mobilityMode || '' + }, + ...(loggedInUser.dependentsInfo?.map((user) => ({ + text: user.name || user.email, + value: user.mobilityMode || '' + })) || []) + ]} + value={selectedMobilityProfile} + /> + + )} ) } + const queryParamConfig = { modeButtons: DelimitedArrayParam } const mapStateToProps = (state: AppReduxState) => {