Skip to content

Commit 8774381

Browse files
committed
add cancel
1 parent e635b41 commit 8774381

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

packages/tdb-dashboard/src/pages/PlansPage.js

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,17 @@ export const PlansPage = (props) => {
4040
[SCALE_PLAN] : SCALE_PLAN
4141
}
4242

43+
const communityActions = () =>{
44+
if(toBedisabled[tier]){
45+
alert("DownGrade")
46+
}else{
47+
navigate("/")
48+
}
49+
}
4350

4451
const getPlanButton = (plansObj)=>{
4552
const plansActionsObj = {
46-
[COMMUNITY_PLAN] : ()=>{navigate("/")},
53+
[COMMUNITY_PLAN] : ()=>{communityActions()},
4754
[PROFESSIONAL_PLAN] : () =>{setShowModalPlan(plansObj)},
4855
[SCALE_PLAN] : () =>{setShowModalPlan(plansObj)},
4956
[ENTERPRISE_PLAN] : ()=>{setShowFeedbackForm(true)},
@@ -57,9 +64,14 @@ export const PlansPage = (props) => {
5764
disabled = {disabled:true}
5865
}
5966

67+
let buttonLabel = plansObj.buttonLabel
68+
if(plansObj.title === COMMUNITY_PLAN && toBedisabled[tier]){
69+
buttonLabel = "Downgrade to Community"
70+
}
71+
6072
return <Button {...planAction} style= {style} {...disabled}
6173
className="text-white fw-bold w-100 mt-5 mb-5 pt-3 pb-3" >
62-
{plansObj.buttonLabel}
74+
{buttonLabel}
6375
</Button>
6476
}
6577

@@ -99,6 +111,8 @@ export const PlansPage = (props) => {
99111
</Col>
100112
})}
101113
</Row>
114+
<Card>
115+
</Card>
102116
</Container>
103117
</Layout>
104118

0 commit comments

Comments
 (0)