Skip to content

Commit

Permalink
Change "Success" popup
Browse files Browse the repository at this point in the history
  • Loading branch information
jmgasper committed Jan 17, 2023
1 parent a5dd4b8 commit c930000
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
9 changes: 6 additions & 3 deletions src/components/ChallengeEditor/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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}
/>
)
Expand Down
4 changes: 3 additions & 1 deletion src/components/Modal/AlertModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 }) => (
<Modal theme={theme} onCancel={onClose}>
<div className={cn(styles.contentContainer, styles.confirm)}>
<div className={styles.title}>{title}</div>
Expand All @@ -28,6 +28,7 @@ const AlertModal = ({ title, message, theme, onClose, closeLink, okLink, closeTe
text={okText}
type={'success'}
link={okLink}
onClick={okLink ? () => {} : onOk}
/>
</div>
)}
Expand All @@ -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,
Expand Down
5 changes: 3 additions & 2 deletions src/components/Modal/ConfirmationModal.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,10 @@
width: 193px;
height: 40px;
margin-right: 33px;

span {
font-size: 18px;
font-size: 16px;
line-height: 1;
font-weight: 500;
}
}
Expand Down

0 comments on commit c930000

Please sign in to comment.