feat: add subscription update and cancel logics

This commit is contained in:
Ali BARIN
2023-04-06 13:08:49 +00:00
parent 3e268bf66b
commit 7d47793afb
15 changed files with 170 additions and 54 deletions

View File

@@ -191,7 +191,8 @@ export default function UsageDataInformation() {
<Divider sx={{ mt: 2 }} />
</Box>
<Button
{/* free plan has `null` status so that we can show the upgrade button */}
{billingAndUsageData?.subscription?.status === null && <Button
component={Link}
to={URLS.SETTINGS_PLAN_UPGRADE}
size="small"
@@ -199,7 +200,7 @@ export default function UsageDataInformation() {
sx={{ mt: 2, alignSelf: 'flex-end' }}
>
{formatMessage('usageDataInformation.upgrade')}
</Button>
</Button>}
</CardContent>
</Card>
</React.Fragment>