refactor: HOCs named imports

This commit is contained in:
Ahmed Bouhuolia
2026-01-01 21:58:42 +02:00
parent 5d872798ff
commit 0f377e19f3
712 changed files with 1367 additions and 1360 deletions

View File

@@ -5,8 +5,8 @@ import { Redirect } from 'react-router-dom';
import { BillingPageBoot } from './BillingPageBoot';
import { BillingPageContent } from './BillingPageContent';
import { useDashboardMeta } from '@/hooks/query';
import withAlertActions from '../Alert/withAlertActions';
import withDashboardActions from '../Dashboard/withDashboardActions';
import { withAlertActions } from '../Alert/withAlertActions';
import { withDashboardActions } from '../Dashboard/withDashboardActions';
function BillingPageRoot({
openAlert,

View File

@@ -4,9 +4,9 @@ import clsx from 'classnames';
import { includes } from 'lodash';
import { Box, Group, Stack } from '@/components';
import { Button, Card, Classes, Intent, Text } from '@blueprintjs/core';
import withAlertActions from '../Alert/withAlertActions';
import { withAlertActions } from '../Alert/withAlertActions';
import styles from './BillingSubscription.module.scss';
import withDrawerActions from '../Drawer/withDrawerActions';
import { withDrawerActions } from '../Drawer/withDrawerActions';
import { DRAWERS } from '@/constants/drawers';
import { useBillingPageBoot } from './BillingPageBoot';
import { getSubscriptionStatusText } from './_utils';

View File

@@ -4,8 +4,8 @@ import * as R from 'ramda';
import { Intent, Alert } from '@blueprintjs/core';
import { AppToaster, FormattedMessage as T } from '@/components';
import withAlertStoreConnect from '@/containers/Alert/withAlertStoreConnect';
import withAlertActions from '@/containers/Alert/withAlertActions';
import { withAlertStoreConnect } from '@/containers/Alert/withAlertStoreConnect';
import { withAlertActions } from '@/containers/Alert/withAlertActions';
import { useCancelMainSubscription } from '@/hooks/query/subscription';

View File

@@ -4,8 +4,8 @@ import * as R from 'ramda';
import { Intent, Alert } from '@blueprintjs/core';
import { AppToaster, FormattedMessage as T } from '@/components';
import withAlertStoreConnect from '@/containers/Alert/withAlertStoreConnect';
import withAlertActions from '@/containers/Alert/withAlertActions';
import { withAlertStoreConnect } from '@/containers/Alert/withAlertStoreConnect';
import { withAlertActions } from '@/containers/Alert/withAlertActions';
import { useResumeMainSubscription } from '@/hooks/query/subscription';
/**

View File

@@ -2,7 +2,7 @@
import React, { lazy } from 'react';
import * as R from 'ramda';
import { Drawer, DrawerHeaderContent, DrawerSuspense } from '@/components';
import withDrawers from '@/containers/Drawer/withDrawers';
import { withDrawers } from '@/containers/Drawer/withDrawers';
import { Position } from '@blueprintjs/core';
import { DRAWERS } from '@/constants/drawers';

View File

@@ -8,7 +8,7 @@ import { useSubscriptionPlans } from '@/hooks/constants/useSubscriptionPlans';
import { useChangeSubscriptionPlan } from '@/hooks/query/subscription';
import { withSubscriptionPlanMapper } from '../../component/withSubscriptionPlanMapper';
import { withPlans } from '../../withPlans';
import withDrawerActions from '@/containers/Drawer/withDrawerActions';
import { withDrawerActions } from '@/containers/Drawer/withDrawerActions';
import { DRAWERS } from '@/constants/drawers';
export function ChangeSubscriptionPlans() {

View File

@@ -6,4 +6,4 @@ export const mapDispatchToProps = (dispatch) => ({
requestSubmitBilling: (form) => dispatch(submitBilling({ form })),
});
export default connect(null, mapDispatchToProps);
export const withBillingActions = connect(null, mapDispatchToProps);

View File

@@ -2,7 +2,7 @@
import { connect } from 'react-redux';
import { getPlanSelector } from '@/store/plans/plans.selectors';
export default (mapState) => {
export const withPlan = (mapState) => {
const mapStateToProps = (state, props) => {
const getPlan = getPlanSelector();

View File

@@ -19,4 +19,4 @@ export const mapDispatchToProps: MapDispatchToProps<
dispatch(changePlansPeriod({ period })),
});
export default connect(null, mapDispatchToProps);
export const withSubscriptionPlansActions = connect(null, mapDispatchToProps);

View File

@@ -6,7 +6,7 @@ import {
isSubscriptionActiveFactory,
} from '@/store/subscription/subscription.selectors';
export default (mapState, slug) => {
export const withSubscriptions = (mapState, slug) => {
const isSubscriptionOnTrial = isSubscriptionOnTrialFactory(slug);
const isSubscriptionInactive = isSubscriptionInactiveFactory(slug);
const isSubscriptionActive = isSubscriptionActiveFactory(slug);

View File

@@ -6,4 +6,4 @@ const mapDispatchToProps = (dispatch) => ({
requestFetchSubscriptions: () => dispatch(fetchSubscriptions()),
});
export default connect(null, mapDispatchToProps);
export const withSubscriptionsActions = connect(null, mapDispatchToProps);

View File

@@ -5,7 +5,7 @@ import {
isSubscriptionsActiveFactory,
} from '@/store/subscription/subscription.selectors';
export default (mapState) => {
export const withSubscriptionss = (mapState) => {
const isSubscriptionsInactive = isSubscriptionsInactiveFactory();
const isSubscriptionsActive = isSubscriptionsActiveFactory();