Skip to content

Commit

Permalink
chore: fix prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
hamed-musallam committed Oct 23, 2024
1 parent fce8ae1 commit 8984793
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 35 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,17 +1,11 @@
import { yupResolver } from '@hookform/resolvers/yup';
import type {
Filter,
} from 'nmr-processing';
import type { Filter } from 'nmr-processing';
import { useCallback, useEffect, useRef } from 'react';
import { useForm } from 'react-hook-form';
import * as Yup from 'yup';

import type {
Apodization1DOptions as BaseApodizationOptions
} from '../../../../../data/constants/DefaultApodizationOptions.js';
import {
defaultApodizationOptions
} from '../../../../../data/constants/DefaultApodizationOptions.js';
import type { Apodization1DOptions as BaseApodizationOptions } from '../../../../../data/constants/DefaultApodizationOptions.js';
import { defaultApodizationOptions } from '../../../../../data/constants/DefaultApodizationOptions.js';
import { useDispatch } from '../../../../context/DispatchContext.js';
import { useSyncedFilterOptions } from '../../../../context/FilterSyncOptionsContext.js';

Expand Down
4 changes: 1 addition & 3 deletions src/component/reducer/Reducer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@ import { produce, original } from 'immer';
import type { CorrelationData } from 'nmr-correlation';
import { buildCorrelationData } from 'nmr-correlation';
import type { Spectrum, ViewState } from 'nmr-load-save';
import type {
BaselineCorrectionZone,
} from 'nmr-processing';
import type { BaselineCorrectionZone } from 'nmr-processing';
import type { Reducer } from 'react';

import type { Apodization1DOptions } from '../../data/constants/DefaultApodizationOptions.js';
Expand Down
42 changes: 20 additions & 22 deletions src/component/reducer/actions/FiltersActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@ import type {
Spectrum1D,
Spectrum2D,
} from 'nmr-load-save';
import type {
BaselineCorrectionOptions,
} from 'nmr-processing';
import type { BaselineCorrectionOptions } from 'nmr-processing';
import {
Filters,
FiltersManager,
Expand Down Expand Up @@ -197,15 +195,15 @@ export type FiltersActions =
| SetTwoDimensionPhaseCorrectionPivotPoint
| ManualTwoDimensionsPhaseCorrectionFilterAction
| ActionType<
| 'APPLY_FFT_FILTER'
| 'APPLY_FFT_DIMENSION_1_FILTER'
| 'APPLY_FFT_DIMENSION_2_FILTER'
| 'APPLY_AUTO_PHASE_CORRECTION_FILTER'
| 'APPLY_ABSOLUTE_FILTER'
| 'APPLY_MANUAL_PHASE_CORRECTION_TOW_DIMENSION_FILTER'
| 'TOGGLE_ADD_PHASE_CORRECTION_TRACE_TO_BOTH_DIRECTIONS'
| 'APPLY_AUTO_PHASE_CORRECTION_TOW_DIMENSION_FILTER'
>;
| 'APPLY_FFT_FILTER'
| 'APPLY_FFT_DIMENSION_1_FILTER'
| 'APPLY_FFT_DIMENSION_2_FILTER'
| 'APPLY_AUTO_PHASE_CORRECTION_FILTER'
| 'APPLY_ABSOLUTE_FILTER'
| 'APPLY_MANUAL_PHASE_CORRECTION_TOW_DIMENSION_FILTER'
| 'TOGGLE_ADD_PHASE_CORRECTION_TRACE_TO_BOTH_DIRECTIONS'
| 'APPLY_AUTO_PHASE_CORRECTION_TOW_DIMENSION_FILTER'
>;

function getFilterUpdateDomainRules(
filterName: string,
Expand Down Expand Up @@ -371,16 +369,16 @@ function rollbackSpectrum(
const applyFilter = !filterKey
? true
: [
phaseCorrection.id,
phaseCorrectionTwoDimensions.id,
fft.id,
shiftX.id,
shift2DX.id,
shift2DY.id,
signalProcessing.id,
digitalFilter.id,
digitalFilter2D.id,
].includes(filterKey);
phaseCorrection.id,
phaseCorrectionTwoDimensions.id,
fft.id,
shiftX.id,
shift2DX.id,
shift2DY.id,
signalProcessing.id,
digitalFilter.id,
digitalFilter2D.id,
].includes(filterKey);

beforeRollback(draft, filterKey);

Expand Down

0 comments on commit 8984793

Please sign in to comment.