Refactor/context and scopes (#1602)
* Put onImport in a context * Refactored RecoilScopeContexts * Refactored naming * Fix tests --------- Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
import { type Context, useContext } from 'react';
|
||||
import { useContext } from 'react';
|
||||
import styled from '@emotion/styled';
|
||||
import { Draggable, Droppable, DroppableProvided } from '@hello-pangea/dnd';
|
||||
import { useRecoilValue } from 'recoil';
|
||||
@ -52,13 +52,11 @@ export function EntityBoardColumn({
|
||||
column,
|
||||
onDelete,
|
||||
onTitleEdit,
|
||||
scopeContext,
|
||||
}: {
|
||||
boardOptions: BoardOptions;
|
||||
column: BoardColumnDefinition;
|
||||
onDelete?: (columnId: string) => void;
|
||||
onTitleEdit: (columnId: string, title: string, color: string) => void;
|
||||
scopeContext: Context<string | null>;
|
||||
}) {
|
||||
const boardColumnId = useContext(BoardColumnIdContext) ?? '';
|
||||
|
||||
@ -94,7 +92,6 @@ export function EntityBoardColumn({
|
||||
index={index}
|
||||
cardId={cardId}
|
||||
boardOptions={boardOptions}
|
||||
scopeContext={scopeContext}
|
||||
/>
|
||||
</BoardCardIdContext.Provider>
|
||||
))}
|
||||
|
||||
Reference in New Issue
Block a user