mirror of
https://github.com/toeverything/AFFiNE.git
synced 2024-12-22 20:41:53 +03:00
chore: add kanban card ref page flag
This commit is contained in:
parent
4a7c6be8a0
commit
612ee4926d
@ -5,6 +5,7 @@ import {
|
|||||||
useRefPage,
|
useRefPage,
|
||||||
} from '@toeverything/components/editor-core';
|
} from '@toeverything/components/editor-core';
|
||||||
import { styled } from '@toeverything/components/ui';
|
import { styled } from '@toeverything/components/ui';
|
||||||
|
import { useFlag } from '@toeverything/datasource/feature-flags';
|
||||||
|
|
||||||
const CardContent = styled('div')({
|
const CardContent = styled('div')({
|
||||||
margin: '20px',
|
margin: '20px',
|
||||||
@ -63,12 +64,13 @@ export const CardItem = ({
|
|||||||
}) => {
|
}) => {
|
||||||
const { addSubItem } = useKanban();
|
const { addSubItem } = useKanban();
|
||||||
const { openSubPage } = useRefPage();
|
const { openSubPage } = useRefPage();
|
||||||
|
const showKanbanRefPageFlag = useFlag('ShowKanbanRefPage', false);
|
||||||
const onAddItem = async () => {
|
const onAddItem = async () => {
|
||||||
await addSubItem(block);
|
await addSubItem(block);
|
||||||
};
|
};
|
||||||
|
|
||||||
const onClickCard = async () => {
|
const onClickCard = async () => {
|
||||||
openSubPage(id);
|
showKanbanRefPageFlag && openSubPage(id);
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
Loading…
Reference in New Issue
Block a user