mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 04:40:32 +00:00
feat: optimize the onboarding subscription experience.
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
// @ts-nocheck
|
||||
import { useEffect } from 'react';
|
||||
import * as R from 'ramda';
|
||||
|
||||
import { Box } from '@/components';
|
||||
import { SubscriptionPlansSection } from './SubscriptionPlansSection';
|
||||
import withSubscriptionPlansActions from '../../Subscriptions/withSubscriptionPlansActions';
|
||||
import styles from './SetupSubscription.module.scss';
|
||||
|
||||
/**
|
||||
* Subscription step of wizard setup.
|
||||
*/
|
||||
function SetupSubscription({
|
||||
// #withSubscriptionPlansActions
|
||||
initSubscriptionPlans,
|
||||
}) {
|
||||
useEffect(() => {
|
||||
initSubscriptionPlans();
|
||||
}, [initSubscriptionPlans]);
|
||||
|
||||
useEffect(() => {
|
||||
window.LemonSqueezy.Setup({
|
||||
eventHandler: (event) => {
|
||||
// Do whatever you want with this event data
|
||||
if (event.event === 'Checkout.Success') {
|
||||
}
|
||||
},
|
||||
});
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<Box className={styles.root}>
|
||||
<SubscriptionPlansSection />
|
||||
</Box>
|
||||
);
|
||||
}
|
||||
|
||||
export default R.compose(withSubscriptionPlansActions)(SetupSubscription);
|
||||
Reference in New Issue
Block a user