Reorganize context/states/selectors in dedicated folders (#1205)
* Reorganize context/states/selectors in dedicated folders * linter
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
import { useContext } from 'react';
|
||||
|
||||
import { RowIdContext } from '../states/RowIdContext';
|
||||
import { RowIdContext } from '../contexts/RowIdContext';
|
||||
|
||||
export function useCurrentRowEntityId() {
|
||||
const currentEntityId = useContext(RowIdContext);
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
import { useContext } from 'react';
|
||||
import { useRecoilCallback, useRecoilState } from 'recoil';
|
||||
|
||||
import { RowIdContext } from '../contexts/RowIdContext';
|
||||
import { isRowSelectedFamilyState } from '../states/isRowSelectedFamilyState';
|
||||
import { RowIdContext } from '../states/RowIdContext';
|
||||
|
||||
export function useCurrentRowSelected() {
|
||||
const currentRowId = useContext(RowIdContext);
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import { useRecoilCallback, useRecoilValue } from 'recoil';
|
||||
|
||||
import { allRowsSelectedStatusSelector } from '../states/allRowsSelectedStatusSelector';
|
||||
import { isRowSelectedFamilyState } from '../states/isRowSelectedFamilyState';
|
||||
import { allRowsSelectedStatusSelector } from '../states/selectors/allRowsSelectedStatusSelector';
|
||||
import { tableRowIdsState } from '../states/tableRowIdsState';
|
||||
|
||||
export function useSelectAllRows() {
|
||||
|
||||
@ -3,7 +3,7 @@ import { useRecoilCallback } from 'recoil';
|
||||
import { availableFiltersScopedState } from '@/ui/filter-n-sort/states/availableFiltersScopedState';
|
||||
import { FilterDefinition } from '@/ui/filter-n-sort/types/FilterDefinition';
|
||||
import { useResetTableRowSelection } from '@/ui/table/hooks/useResetTableRowSelection';
|
||||
import { TableContext } from '@/ui/table/states/TableContext';
|
||||
import { TableRecoilScopeContext } from '@/ui/table/states/recoil-scope-contexts/TableRecoilScopeContext';
|
||||
import { tableEntitiesFamilyState } from '@/ui/table/states/tableEntitiesFamilyState';
|
||||
import { tableRowIdsState } from '@/ui/table/states/tableRowIdsState';
|
||||
import { useContextScopeId } from '@/ui/utilities/recoil-scope/hooks/useContextScopeId';
|
||||
@ -14,7 +14,7 @@ import { numberOfTableRowsState } from '../states/numberOfTableRowsState';
|
||||
export function useSetEntityTableData() {
|
||||
const resetTableRowSelection = useResetTableRowSelection();
|
||||
|
||||
const tableContextScopeId = useContextScopeId(TableContext);
|
||||
const tableContextScopeId = useContextScopeId(TableRecoilScopeContext);
|
||||
|
||||
return useRecoilCallback(
|
||||
({ set, snapshot }) =>
|
||||
|
||||
@ -41,7 +41,7 @@ import {
|
||||
ViewFieldURLMetadata,
|
||||
ViewFieldURLValue,
|
||||
} from '../../editable-field/types/ViewField';
|
||||
import { EntityUpdateMutationContext } from '../states/EntityUpdateMutationHookContext';
|
||||
import { EntityUpdateMutationContext } from '../contexts/EntityUpdateMutationHookContext';
|
||||
|
||||
export function useUpdateEntityField() {
|
||||
const updateEntity = useContext(EntityUpdateMutationContext);
|
||||
|
||||
Reference in New Issue
Block a user