-
-
Notifications
You must be signed in to change notification settings - Fork 262
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Move billing to preferences (#566)
* feat: move billing to preferences * chore: remove the commented lines
- Loading branch information
Showing
7 changed files
with
37 additions
and
32 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
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
28 changes: 20 additions & 8 deletions
28
packages/webapp/src/containers/Subscriptions/BillingPage.tsx
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 |
---|---|---|
@@ -1,28 +1,40 @@ | ||
// @ts-nocheck | ||
import { useEffect } from 'react'; | ||
import * as R from 'ramda'; | ||
import { Redirect } from 'react-router-dom'; | ||
import { BillingPageBoot } from './BillingPageBoot'; | ||
import { BillingPageContent } from './BillingPageContent'; | ||
import { DashboardInsider } from '@/components'; | ||
import { useDashboardMeta } from '@/hooks/query'; | ||
import withAlertActions from '../Alert/withAlertActions'; | ||
import withDashboardActions from '../Dashboard/withDashboardActions'; | ||
|
||
function BillingPageRoot({ openAlert }) { | ||
function BillingPageRoot({ | ||
openAlert, | ||
|
||
// #withAlertActions | ||
changePreferencesPageTitle, | ||
}) { | ||
const { data: dashboardMeta } = useDashboardMeta({ | ||
keepPreviousData: true, | ||
}); | ||
|
||
useEffect(() => { | ||
changePreferencesPageTitle('Billing'); | ||
}, [changePreferencesPageTitle]); | ||
|
||
// In case the edition is not Bigcapital Cloud, redirect to the homepage. | ||
if (!dashboardMeta.is_bigcapital_cloud) { | ||
return <Redirect to={{ pathname: '/' }} />; | ||
} | ||
|
||
return ( | ||
<DashboardInsider> | ||
<BillingPageBoot> | ||
<BillingPageContent /> | ||
</BillingPageBoot> | ||
</DashboardInsider> | ||
<BillingPageBoot> | ||
<BillingPageContent /> | ||
</BillingPageBoot> | ||
); | ||
} | ||
|
||
export default R.compose(withAlertActions)(BillingPageRoot); | ||
export default R.compose( | ||
withAlertActions, | ||
withDashboardActions, | ||
)(BillingPageRoot); |
5 changes: 1 addition & 4 deletions
5
packages/webapp/src/containers/Subscriptions/BillingPageContent.module.scss
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 |
---|---|---|
@@ -1,8 +1,5 @@ | ||
.root { | ||
display: flex; | ||
flex-direction: column; | ||
padding: 32px 40px; | ||
min-width: 800px; | ||
max-width: 900px; | ||
width: 75%; | ||
padding: 20px; | ||
} |
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