Reorganize context/states/selectors in dedicated folders (#1205)

* Reorganize context/states/selectors in dedicated folders

* linter
This commit is contained in:
Weiko
2023-08-14 15:08:47 -07:00
committed by GitHub
parent cd3a32e555
commit 7d900ad1c6
134 changed files with 251 additions and 320 deletions

View File

@ -1,3 +0,0 @@
import { createContext } from 'react';
export const BoardCardContext = createContext<string | null>(null);

View File

@ -1,3 +0,0 @@
import { createContext } from 'react';
export const BoardCardIdContext = createContext<string | null>(null);

View File

@ -1,3 +0,0 @@
import { createContext } from 'react';
export const BoardColumnContext = createContext<string | null>(null);

View File

@ -1,3 +0,0 @@
import { createContext } from 'react';
export const BoardColumnIdContext = createContext<string | null>(null);

View File

@ -1,5 +0,0 @@
import { createContext } from 'react';
import { BoardOptions } from '@/ui/board/types/BoardOptions';
export const BoardOptionsContext = createContext<BoardOptions | null>(null);

View File

@ -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,
});

View File

@ -0,0 +1,3 @@
import { createContext } from 'react';
export const BoardColumnRecoilScopeContext = createContext<string | null>(null);

View File

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

View File

@ -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',