File tree Expand file tree Collapse file tree 3 files changed +15
-1
lines changed Expand file tree Collapse file tree 3 files changed +15
-1
lines changed Original file line number Diff line number Diff line change 10631063 "__PLAN_PAGE_MODULE_TOUCHPOINTS_TOUCHPOINT_WEB_LINK_LABEL" : " Test link" ,
10641064 "__PLAN_PAGE_MODULE_TOUCHPOINTS_TOUCHPOINT_WEB_LINK_PLACEHOLDER" : " https://example.com" ,
10651065 "__PLAN_PAGE_NAV_GENERIC_MODULE_ERROR" : " This item has some errors" ,
1066+ "__PLAN_PAGE_PURCHASE_SUCCESS" : " Purchase successfully completed" ,
10661067 "__PLAN_PAGE_SAVE_AS_TEMPLATE_MODAL_BUTTON_CANCEL" : " Cancel" ,
10671068 "__PLAN_PAGE_SAVE_AS_TEMPLATE_MODAL_BUTTON_CONFIRM" : " Save template" ,
10681069 "__PLAN_PAGE_SAVE_AS_TEMPLATE_MODAL_BUTTON_CONTINUE_SETUP" : " Continue setup" ,
Original file line number Diff line number Diff line change 10931093 "__PLAN_PAGE_MODULE_TOUCHPOINTS_TOUCHPOINT_WEB_LINK_LABEL" : " " ,
10941094 "__PLAN_PAGE_MODULE_TOUCHPOINTS_TOUCHPOINT_WEB_LINK_PLACEHOLDER" : " " ,
10951095 "__PLAN_PAGE_NAV_GENERIC_MODULE_ERROR" : " " ,
1096+ "__PLAN_PAGE_PURCHASE_SUCCESS" : " " ,
10961097 "__PLAN_PAGE_SAVE_AS_TEMPLATE_MODAL_BUTTON_CANCEL" : " " ,
10971098 "__PLAN_PAGE_SAVE_AS_TEMPLATE_MODAL_BUTTON_CONFIRM" : " " ,
10981099 "__PLAN_PAGE_SAVE_AS_TEMPLATE_MODAL_BUTTON_CONTINUE_SETUP" : " " ,
Original file line number Diff line number Diff line change 1+ import { useToast , Notification } from '@appquality/unguess-design-system' ;
12import { useEffect , useState } from 'react' ;
23import { useTranslation } from 'react-i18next' ;
34import {
@@ -28,6 +29,7 @@ const PlanPage = ({ plan }: { plan: GetPlansByPidApiResponse | undefined }) => {
2829 const { t } = useTranslation ( ) ;
2930 const { activeTab, setActiveTab } = usePlanContext ( ) ;
3031 const [ search ] = useSearchParams ( ) ;
32+ const { addToast } = useToast ( ) ;
3133
3234 useEffect ( ( ) => {
3335 if ( ! plan ) return ;
@@ -39,7 +41,17 @@ const PlanPage = ({ plan }: { plan: GetPlansByPidApiResponse | undefined }) => {
3941
4042 useEffect ( ( ) => {
4143 if ( search && search . get ( 'payment' ) === 'success' ) {
42- alert ( 'Urrà' ) ;
44+ addToast (
45+ ( { close } ) => (
46+ < Notification
47+ onClose = { close }
48+ type = "success"
49+ message = { t ( '__PLAN_PAGE_PURCHASE_SUCCESS' ) }
50+ isPrimary
51+ />
52+ ) ,
53+ { placement : 'top' }
54+ ) ;
4355 }
4456
4557 const url = window . location . origin + window . location . pathname ;
You can’t perform that action at this time.
0 commit comments