diff --git a/src/components/ChallengeEditor/index.js b/src/components/ChallengeEditor/index.js index 4f28557c..1ec2f781 100644 --- a/src/components/ChallengeEditor/index.js +++ b/src/components/ChallengeEditor/index.js @@ -1351,6 +1351,7 @@ class ChallengeEditor extends Component { } const isTask = _.get(challenge, 'task.isTask', false) const { assignedMemberDetails, error } = this.state + const communityAppUrl = `${COMMUNITY_APP_URL}/challenges/${challenge.id}` let isActive = false let isDraft = false let isCompleted = false @@ -1496,9 +1497,11 @@ class ChallengeEditor extends Component { } theme={theme} closeText='Close' - closeLink='/' - okText='View Challenge' - okLink='./view' + closeLink='./view' + okText='View Challenge on Community App' + onOk={() => { + window.open(communityAppUrl, '_blank') + }} onClose={this.resetModal} /> ) diff --git a/src/components/Modal/AlertModal.js b/src/components/Modal/AlertModal.js index a603a51f..084263c2 100644 --- a/src/components/Modal/AlertModal.js +++ b/src/components/Modal/AlertModal.js @@ -6,7 +6,7 @@ import styles from './ConfirmationModal.module.scss' import OutlineButton from '../Buttons/OutlineButton' import PrimaryButton from '../Buttons/PrimaryButton' -const AlertModal = ({ title, message, theme, onClose, closeLink, okLink, closeText, okText }) => ( +const AlertModal = ({ title, message, theme, onClose, closeLink, okLink, closeText, okText, onOk }) => (
{title}
@@ -28,6 +28,7 @@ const AlertModal = ({ title, message, theme, onClose, closeLink, okLink, closeTe text={okText} type={'success'} link={okLink} + onClick={okLink ? () => {} : onOk} />
)} @@ -41,6 +42,7 @@ AlertModal.propTypes = { message: PropTypes.string, theme: PropTypes.shape(), onClose: PropTypes.func, + onOk: PropTypes.func, closeText: PropTypes.string, closeLink: PropTypes.string, okText: PropTypes.string, diff --git a/src/components/Modal/ConfirmationModal.module.scss b/src/components/Modal/ConfirmationModal.module.scss index 38d46ea2..0fc48a82 100644 --- a/src/components/Modal/ConfirmationModal.module.scss +++ b/src/components/Modal/ConfirmationModal.module.scss @@ -58,9 +58,10 @@ width: 193px; height: 40px; margin-right: 33px; - + span { - font-size: 18px; + font-size: 16px; + line-height: 1; font-weight: 500; } }