-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add alert modal and conditional text for expired subscriptions (#…
- Loading branch information
1 parent
3f6cf6d
commit beca20e
Showing
5 changed files
with
99 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import { | ||
StandardModal, useToggle, | ||
} from '@openedx/paragon'; | ||
import { Link } from 'react-router-dom'; | ||
import { useSubscriptions } from '../app/data'; | ||
|
||
const ExpiredSubscriptionModal = () => { | ||
const { data: { customerAgreement } } = useSubscriptions(); | ||
const [isOpen, ,close] = useToggle(true); | ||
if (!customerAgreement?.hasCustomLicenseExpirationMessaging) { | ||
return null; | ||
} | ||
return ( | ||
<StandardModal | ||
isOpen={isOpen} | ||
className="d-flex justify-content-center align-items-center text-wrap text-right " | ||
hasCloseButton | ||
onClose={close} | ||
> | ||
<p className="text-center"> | ||
{customerAgreement?.expiredSubscriptionModalMessaging} | ||
<Link className="text-decoration-none" to={customerAgreement?.urlForExpiredModal}> {customerAgreement?.hyperLinkTextForExpiredModal}</Link> | ||
</p> | ||
</StandardModal> | ||
); | ||
}; | ||
|
||
export default ExpiredSubscriptionModal; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters