betodealmeida commented on a change in pull request #19314: URL: https://github.com/apache/superset/pull/19314#discussion_r839023216
########## File path: superset-frontend/src/views/CRUD/data/database/DatabaseModal/ModalHeader.tsx ########## @@ -142,19 +154,23 @@ const ModalHeader = ({ </StyledFormHeader> ); + const importDbHeader = ( + <StyledStickyHeader> + <StyledFormHeader> + <p className="helper-top"> STEP 2 OF 2 </p> + <h4>Enter the required {dbModel.name} credentials</h4> + <p className="helper-bottom">{fileCheck ? file[0].name : ''}</p> + </StyledFormHeader> + </StyledStickyHeader> + ); + + if (fileCheck) return importDbHeader; if (isLoading) return <></>; - if (isEditMode) { - return isEditHeader; - } - if (useSqlAlchemyForm) { - return useSqlAlchemyFormHeader; - } - if (hasConnectedDb && !editNewDb) { - return hasConnectedDbHeader; - } - if (db || editNewDb) { - return hasDbHeader; - } + if (isEditMode) return isEditHeader; + if (useSqlAlchemyForm) return useSqlAlchemyFormHeader; + if (hasConnectedDb && !editNewDb) return hasConnectedDbHeader; + if (db || editNewDb) return hasDbHeader; Review comment: Ah, I had forgotten the `case`. I wouldn't stress about, I'm not even sure if we can use `return` inside a `switch`, they're weird beasts. :-P -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org For additional commands, e-mail: notifications-h...@superset.apache.org