mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-13 12:55:00 +00:00
fix: ignore trash (#1426)
This commit is contained in:
@@ -93,27 +93,32 @@ export const Results: React.FC<ResultsProps> = ({
|
||||
<div>
|
||||
{recentlyViewed.length > 0 && (
|
||||
<Command.Group heading={t('Recent')}>
|
||||
{recentlyViewed.map(recent => {
|
||||
return (
|
||||
<Command.Item
|
||||
key={recent.id}
|
||||
value={recent.id}
|
||||
onSelect={() => {
|
||||
onClose();
|
||||
jumpToPage(blockSuiteWorkspace.id, recent.id);
|
||||
}}
|
||||
>
|
||||
<StyledListItem>
|
||||
{recent.mode === 'edgeless' ? (
|
||||
<EdgelessIcon />
|
||||
) : (
|
||||
<PaperIcon />
|
||||
)}
|
||||
<span>{recent.title}</span>
|
||||
</StyledListItem>
|
||||
</Command.Item>
|
||||
);
|
||||
})}
|
||||
{recentlyViewed
|
||||
.filter(
|
||||
recent =>
|
||||
pageList.find(page => recent.id === page.id)?.trash !== true
|
||||
)
|
||||
.map(recent => {
|
||||
return (
|
||||
<Command.Item
|
||||
key={recent.id}
|
||||
value={recent.id}
|
||||
onSelect={() => {
|
||||
onClose();
|
||||
jumpToPage(blockSuiteWorkspace.id, recent.id);
|
||||
}}
|
||||
>
|
||||
<StyledListItem>
|
||||
{recent.mode === 'edgeless' ? (
|
||||
<EdgelessIcon />
|
||||
) : (
|
||||
<PaperIcon />
|
||||
)}
|
||||
<span>{recent.title}</span>
|
||||
</StyledListItem>
|
||||
</Command.Item>
|
||||
);
|
||||
})}
|
||||
</Command.Group>
|
||||
)}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user