Skip to content

Commit

Permalink
selectors refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
SKarolFolio committed Nov 29, 2024
1 parent 3b67282 commit f09ed72
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/common/hooks/useProfileSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ export const useProfileSchema = () => {
const [schema, setSchema] = useRecoilState(state.config.schema);
const setSelectedEntries = useSetRecoilState(state.config.selectedEntries);
const setCollapsibleEntries = useSetRecoilState(state.ui.collapsibleEntries);
const { setIsEditedRecord: setIsEdited } = useStatusStore();
const setUserValues = useSetRecoilState(state.inputs.userValues);
const { setIsEditedRecord: setIsEdited } = useStatusStore();

const getSchemaWithCopiedEntries = (entry: SchemaEntry, selectedEntries: string[]) => {
selectedEntriesService.set(selectedEntries);
Expand Down
2 changes: 1 addition & 1 deletion src/components/CommonStatus/CommonStatus.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ import classNames from 'classnames';
import { FormattedMessage } from 'react-intl';
import { StatusType } from '@common/constants/status.constants';
import { Button, ButtonType } from '@components/Button';
import { useStatusStore } from '@src/store';
import CloseIcon from '@src/assets/times-16.svg?react';
import CheckCircleIcon from '@src/assets/check-circle.svg?react';
import WarningIcon from '@src/assets/exclamation-triangle.svg?react';
import ErrorIcon from '@src/assets/exclamation-circle.svg?react';
import './CommonStatus.scss';
import { useStatusStore } from '@src/store';

const DELETE_TIMEOUT = 10000;

Expand Down
2 changes: 2 additions & 0 deletions src/store/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
export * from './status';
export * from './marcPreview';
export * from './selectors';
1 change: 1 addition & 0 deletions src/test/__mocks__/setupMocks.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import './common/helpers/env.helper.mock';
import './lib/intl.mock';
import './lib/window.mock';
import './store';
1 change: 1 addition & 0 deletions src/test/__mocks__/store/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
jest.mock('@src/store');

0 comments on commit f09ed72

Please sign in to comment.