chore: clean all page list (#2245)

This commit is contained in:
Whitewater
2023-05-05 12:46:58 -07:00
committed by GitHub
parent fbbcb4bad9
commit dbd3249ae5
3 changed files with 27 additions and 6 deletions

View File

@@ -233,7 +233,6 @@ export type TrashListData = {
pageId: string;
icon: JSX.Element;
title: string;
favorite: boolean;
createDate: string;
updatedDate?: string;
trashDate?: string;

View File

@@ -50,10 +50,23 @@ AffineAllPageList.args = {
favorite: false,
icon: <PageIcon />,
isPublicPage: true,
title: 'Example Page',
updatedDate: '2021-01-01',
title: 'Example Public Page with long title that will be truncated',
createDate: '2021-01-01',
trashDate: '2021-01-01',
updatedDate: '2021-01-01',
bookmarkPage: () => toast('Bookmark page'),
onClickPage: () => toast('Click page'),
onDisablePublicSharing: () => toast('Disable public sharing'),
onOpenPageInNewTab: () => toast('Open page in new tab'),
removeToTrash: () => toast('Remove to trash'),
},
{
pageId: '2',
favorite: true,
isPublicPage: false,
icon: <PageIcon />,
title: 'Favorited Page',
createDate: '2021-01-01',
updatedDate: '2021-01-01',
bookmarkPage: () => toast('Bookmark page'),
onClickPage: () => toast('Click page'),
onDisablePublicSharing: () => toast('Disable public sharing'),
@@ -75,7 +88,6 @@ AffineTrashPageList.args = {
list: [
{
pageId: '1',
favorite: false,
icon: <PageIcon />,
title: 'Example Page',
updatedDate: '2021-01-01',
@@ -85,5 +97,16 @@ AffineTrashPageList.args = {
onPermanentlyDeletePage: () => toast('Permanently delete page'),
onRestorePage: () => toast('Restore page'),
},
{
pageId: '2',
icon: <PageIcon />,
title: 'Example Page with long title that will be truncated',
updatedDate: '2021-01-01',
createDate: '2021-01-01',
trashDate: '2021-01-01',
onClickPage: () => toast('Click page'),
onPermanentlyDeletePage: () => toast('Permanently delete page'),
onRestorePage: () => toast('Restore page'),
},
],
};