diff --git a/pages/index.tsx b/pages/index.tsx index ab043bc..99b5210 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -8,9 +8,9 @@ import * as InsuranceTableConfig from 'config/tables/insurance-table'; import { merge } from 'lodash-es'; import type { GetServerSideProps } from 'next'; import Head from 'next/head'; -import calculateValidationReactions from 'process/calculate/reactions/validation'; +import * as calculateReactions from 'process/calculate/reactions'; import { getCRMData } from 'process/init/get-data'; -import leadOpportunityUrlsReactions from 'process/lead-opportunity/reactions/urls'; +import * as leadOpportunityReactions from 'process/lead-opportunity/reactions'; import paymentsReactions from 'process/payments/reactions'; import { fetchUser } from 'services/user'; import { useStore } from 'stores/hooks'; @@ -48,9 +48,9 @@ function Home() { */ setTimeout(() => { - leadOpportunityUrlsReactions(store, apolloClient); + leadOpportunityReactions.urls(store, apolloClient); paymentsReactions(store, apolloClient); - calculateValidationReactions(store, apolloClient); + calculateReactions.validation(store, apolloClient); }); return ( diff --git a/process/calculate/reactions/index.js b/process/calculate/reactions/index.js new file mode 100644 index 0000000..204b641 --- /dev/null +++ b/process/calculate/reactions/index.js @@ -0,0 +1,2 @@ +/* eslint-disable import/prefer-default-export */ +export { default as validation } from './validation'; diff --git a/process/calculate/reactions/validation.ts b/process/calculate/reactions/validation.ts index 4e38fdf..f3b3989 100644 --- a/process/calculate/reactions/validation.ts +++ b/process/calculate/reactions/validation.ts @@ -2,10 +2,7 @@ import type { ApolloClient } from '@apollo/client'; import { reaction } from 'mobx'; import type RootStore from 'stores/root'; -export default function calculateValidationReactions( - store: RootStore, - apolloClient: ApolloClient -) { +export default function validationReactions(store: RootStore, apolloClient: ApolloClient) { const { $calculation, $tables } = store; reaction( () => { diff --git a/process/lead-opportunity/reactions/index.js b/process/lead-opportunity/reactions/index.js new file mode 100644 index 0000000..315d0ef --- /dev/null +++ b/process/lead-opportunity/reactions/index.js @@ -0,0 +1,2 @@ +/* eslint-disable import/prefer-default-export */ +export { default as urls } from './urls'; diff --git a/process/lead-opportunity/reactions/urls.ts b/process/lead-opportunity/reactions/urls.ts index b42d89d..790b8e9 100644 --- a/process/lead-opportunity/reactions/urls.ts +++ b/process/lead-opportunity/reactions/urls.ts @@ -4,10 +4,7 @@ import type { Elements } from 'Components/Calculation/config/map/values'; import { reaction } from 'mobx'; import type RootStore from 'stores/root'; -export default function leadOpportunityUrlsReactions( - store: RootStore, - apolloClient: ApolloClient -) { +export default function urlsReactions(store: RootStore, apolloClient: ApolloClient) { const { $calculation } = store; /**