File tree Expand file tree Collapse file tree
src/frontend/src/pages/FinancePage/ReimbursementRequestForm Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -121,8 +121,11 @@ const ReimbursementRequestForm: React.FC<ReimbursementRequestFormProps> = ({
121121 data : allProjects
122122 } = useAllProjects ( ) ;
123123
124- const { data } = useCurrentUserSecureSettings ( ) ;
124+ // checking the data here instead of using isError since function doesn't ever return an error
125+ const { data, isLoading : checkSecureSettingsIsLoading } = useCurrentUserSecureSettings ( ) ;
125126 const userSecureSettings = data ?? { } ;
127+
128+ // checks to make sure none of the secure settings fields are empty, indicating not properly set
126129 const hasSecureSettingsSet = Object . values ( userSecureSettings ) . every ( ( x ) => x !== '' ) ? true : false ;
127130
128131 const toast = useToast ( ) ;
@@ -138,7 +141,8 @@ const ReimbursementRequestForm: React.FC<ReimbursementRequestFormProps> = ({
138141 allProjectsIsLoading ||
139142 ! allVendors ||
140143 ! allExpenseTypes ||
141- ! allProjects
144+ ! allProjects ||
145+ checkSecureSettingsIsLoading
142146 )
143147 return < LoadingIndicator /> ;
144148
You can’t perform that action at this time.
0 commit comments