mirror of
https://github.com/toeverything/AFFiNE.git
synced 2024-12-23 05:42:30 +03:00
chore: set kanban RefPageProvider
This commit is contained in:
parent
dcdc7f8862
commit
4a99080860
@ -4,30 +4,33 @@ import { SceneKanbanContext } from './context';
|
|||||||
import { CardContainerWrapper } from './dndable/wrapper/CardContainerWrapper';
|
import { CardContainerWrapper } from './dndable/wrapper/CardContainerWrapper';
|
||||||
import type { ComponentType } from 'react';
|
import type { ComponentType } from 'react';
|
||||||
import type { CreateView } from '@toeverything/framework/virgo';
|
import type { CreateView } from '@toeverything/framework/virgo';
|
||||||
|
import { RefPageProvider } from './RefPage';
|
||||||
|
|
||||||
export const SceneKanban: ComponentType<CreateView> = withKanban<CreateView>(
|
export const SceneKanban: ComponentType<CreateView> = withKanban<CreateView>(
|
||||||
({ editor, block }) => {
|
({ editor, block }) => {
|
||||||
const { kanban } = useKanban();
|
const { kanban } = useKanban();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<SceneKanbanContext.Provider value={{ editor, block }}>
|
<RefPageProvider>
|
||||||
<CardContainerWrapper
|
<SceneKanbanContext.Provider value={{ editor, block }}>
|
||||||
dataSource={kanban}
|
<CardContainerWrapper
|
||||||
render={({
|
dataSource={kanban}
|
||||||
activeId,
|
render={({
|
||||||
items,
|
activeId,
|
||||||
containerIds,
|
items,
|
||||||
isSortingContainer,
|
containerIds,
|
||||||
}) => (
|
isSortingContainer,
|
||||||
<CardContainer
|
}) => (
|
||||||
activeId={activeId}
|
<CardContainer
|
||||||
items={items}
|
activeId={activeId}
|
||||||
isSortingContainer={isSortingContainer}
|
items={items}
|
||||||
containerIds={containerIds}
|
isSortingContainer={isSortingContainer}
|
||||||
/>
|
containerIds={containerIds}
|
||||||
)}
|
/>
|
||||||
/>
|
)}
|
||||||
</SceneKanbanContext.Provider>
|
/>
|
||||||
|
</SceneKanbanContext.Provider>
|
||||||
|
</RefPageProvider>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user