process: reexport reactions

This commit is contained in:
Chika 2022-07-11 17:33:30 +03:00
parent 7b83dbb248
commit a4fdcc7c62
5 changed files with 10 additions and 12 deletions

View File

@ -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 (

View File

@ -0,0 +1,2 @@
/* eslint-disable import/prefer-default-export */
export { default as validation } from './validation';

View File

@ -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<object>
) {
export default function validationReactions(store: RootStore, apolloClient: ApolloClient<object>) {
const { $calculation, $tables } = store;
reaction(
() => {

View File

@ -0,0 +1,2 @@
/* eslint-disable import/prefer-default-export */
export { default as urls } from './urls';

View File

@ -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<object>
) {
export default function urlsReactions(store: RootStore, apolloClient: ApolloClient<object>) {
const { $calculation } = store;
/**