Reorganize context/states/selectors in dedicated folders (#1205)
* Reorganize context/states/selectors in dedicated folders * linter
This commit is contained in:
@ -1,3 +0,0 @@
|
||||
import { createContext } from 'react';
|
||||
|
||||
export const BoardCardContext = createContext<string | null>(null);
|
||||
@ -1,3 +0,0 @@
|
||||
import { createContext } from 'react';
|
||||
|
||||
export const BoardCardIdContext = createContext<string | null>(null);
|
||||
@ -1,3 +0,0 @@
|
||||
import { createContext } from 'react';
|
||||
|
||||
export const BoardColumnContext = createContext<string | null>(null);
|
||||
@ -1,3 +0,0 @@
|
||||
import { createContext } from 'react';
|
||||
|
||||
export const BoardColumnIdContext = createContext<string | null>(null);
|
||||
@ -1,5 +0,0 @@
|
||||
import { createContext } from 'react';
|
||||
|
||||
import { BoardOptions } from '@/ui/board/types/BoardOptions';
|
||||
|
||||
export const BoardOptionsContext = createContext<BoardOptions | null>(null);
|
||||
@ -1,17 +0,0 @@
|
||||
import { createContext } from 'react';
|
||||
|
||||
import { FieldDefinition } from '@/ui/editable-field/types/FieldDefinition';
|
||||
import {
|
||||
FieldMetadata,
|
||||
FieldType,
|
||||
} from '@/ui/editable-field/types/FieldMetadata';
|
||||
|
||||
export const FieldDefinitionContext = createContext<
|
||||
FieldDefinition<FieldMetadata>
|
||||
>({
|
||||
id: '',
|
||||
label: '',
|
||||
icon: undefined,
|
||||
type: 'unknown' satisfies FieldType,
|
||||
metadata: {} as FieldMetadata,
|
||||
});
|
||||
@ -0,0 +1,3 @@
|
||||
import { createContext } from 'react';
|
||||
|
||||
export const BoardColumnRecoilScopeContext = createContext<string | null>(null);
|
||||
@ -2,7 +2,7 @@ import { selectorFamily } from 'recoil';
|
||||
|
||||
import { companyProgressesFamilyState } from '@/companies/states/companyProgressesFamilyState';
|
||||
|
||||
import { boardCardIdsByColumnIdFamilyState } from './boardCardIdsByColumnIdFamilyState';
|
||||
import { boardCardIdsByColumnIdFamilyState } from '../boardCardIdsByColumnIdFamilyState';
|
||||
|
||||
// TODO: this state should be computed during the synchronization hook and put in a generic
|
||||
// boardColumnTotalsFamilyState indexed by columnId.
|
||||
@ -1,8 +1,8 @@
|
||||
import { selector } from 'recoil';
|
||||
|
||||
import { boardCardIdsByColumnIdFamilyState } from './boardCardIdsByColumnIdFamilyState';
|
||||
import { boardColumnsState } from './boardColumnsState';
|
||||
import { isCardSelectedFamilyState } from './isCardSelectedFamilyState';
|
||||
import { boardCardIdsByColumnIdFamilyState } from '../boardCardIdsByColumnIdFamilyState';
|
||||
import { boardColumnsState } from '../boardColumnsState';
|
||||
import { isCardSelectedFamilyState } from '../isCardSelectedFamilyState';
|
||||
|
||||
export const selectedCardIdsSelector = selector<string[]>({
|
||||
key: 'selectedCardIdsSelector',
|
||||
Reference in New Issue
Block a user