diff --git a/webapp/views/App/views/Home/Dashboard/Helper/Helper.js b/webapp/views/App/views/Home/Dashboard/Helper/Helper.js index 6d348114fb..ba276e473f 100644 --- a/webapp/views/App/views/Home/Dashboard/Helper/Helper.js +++ b/webapp/views/App/views/Home/Dashboard/Helper/Helper.js @@ -21,19 +21,13 @@ const HelperFirstTimeSurvey = () => { values={{ surveyName: Survey.getName(surveyInfo).toUpperCase() }} components={{ title:

, - linkWithIcon: ( - } - /> - ), + linkWithIcon: , basicLink: , }} - > + />
- +
@@ -42,15 +36,9 @@ const HelperFirstTimeSurvey = () => { i18nKey="homeView.dashboard.surveyPropUpdate.secondary" values={{ surveyName: Survey.getName(surveyInfo).toUpperCase() }} components={{ - linkWithIcon: ( - } - /> - ), + linkWithIcon: , }} - > + /> ) @@ -71,15 +59,9 @@ const HelperWithoutAttributes = () => { values={{ surveyName: Survey.getName(surveyInfo).toUpperCase() }} components={{ title:

, - linkWithIcon: ( - } - /> - ), + linkWithIcon: , }} - > + /> @@ -98,9 +80,9 @@ const HelpersByType = { const LinkWithIcon = ({ to, iconLeft, iconRight, children }) => ( - {iconLeft} + {iconLeft && } {children} - {iconRight} + {iconRight && } ) diff --git a/webapp/views/App/views/Home/Dashboard/SurveyInfo/SurveyInfo.js b/webapp/views/App/views/Home/Dashboard/SurveyInfo/SurveyInfo.js index c031f14a0d..3c0e82daf8 100644 --- a/webapp/views/App/views/Home/Dashboard/SurveyInfo/SurveyInfo.js +++ b/webapp/views/App/views/Home/Dashboard/SurveyInfo/SurveyInfo.js @@ -1,6 +1,7 @@ import './SurveyInfo.scss' import React, { useCallback } from 'react' +import PropTypes from 'prop-types' import { useDispatch } from 'react-redux' import { Link, useNavigate } from 'react-router-dom' @@ -18,7 +19,9 @@ import Header from '@webapp/components/header' import ButtonPublishSurvey from '@webapp/components/buttonPublishSurvey' import { Button, ButtonMenu } from '@webapp/components' -const SurveyInfo = () => { +const SurveyInfo = (props) => { + const { firstTime } = props + const i18n = useI18n() const dispatch = useDispatch() const navigate = useNavigate() @@ -84,9 +87,11 @@ const SurveyInfo = () => { {i18n.t(canEditSurvey ? 'homeView.surveyInfo.editInfo' : 'homeView.surveyInfo.viewInfo')} - {canEditSurvey && } + {!firstTime && canEditSurvey && ( + + )} - {canExportSurvey && ( + {!firstTime && canExportSurvey && ( { ) } +SurveyInfo.propTypes = { + firstTime: PropTypes.bool, +} + +SurveyInfo.defaultProps = { + firstTime: false, +} + export default SurveyInfo