mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-15 20:30:33 +00:00
feat: upgrade the subscription plans
This commit is contained in:
@@ -1,9 +1,22 @@
|
||||
// @ts-nocheck
|
||||
import { connect } from 'react-redux';
|
||||
import { initSubscriptionPlans } from '@/store/plans/plans.actions';
|
||||
import { MapDispatchToProps, connect } from 'react-redux';
|
||||
import {
|
||||
SubscriptionPlansPeriod,
|
||||
changePlansPeriod,
|
||||
initSubscriptionPlans,
|
||||
} from '@/store/plans/plans.reducer';
|
||||
|
||||
export const mapDispatchToProps = (dispatch) => ({
|
||||
export interface WithSubscriptionPlansActionsProps {
|
||||
initSubscriptionPlans: () => void;
|
||||
changeSubscriptionPlansPeriod: (period: SubscriptionPlansPeriod) => void;
|
||||
}
|
||||
|
||||
export const mapDispatchToProps: MapDispatchToProps<
|
||||
WithSubscriptionPlansActionsProps,
|
||||
{}
|
||||
> = (dispatch: any) => ({
|
||||
initSubscriptionPlans: () => dispatch(initSubscriptionPlans()),
|
||||
changeSubscriptionPlansPeriod: (period: SubscriptionPlansPeriod) =>
|
||||
dispatch(changePlansPeriod({ period })),
|
||||
});
|
||||
|
||||
export default connect(null, mapDispatchToProps);
|
||||
export default connect(null, mapDispatchToProps);
|
||||
|
||||
Reference in New Issue
Block a user