mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-13 21:05:19 +00:00
fix: solved the issue of the sidebar favoritedList not being fully displayed (#1523)
Co-authored-by: Himself65 <himself65@outlook.com>
This commit is contained in:
@@ -53,19 +53,20 @@ const FavoriteList: React.FC<FavoriteListProps> = ({
|
||||
{favoriteList.map((pageMeta, index) => {
|
||||
const active = router.query.pageId === pageMeta.id;
|
||||
return (
|
||||
<StyledSubListItem
|
||||
data-testid={`favorite-list-item-${pageMeta.id}`}
|
||||
active={active}
|
||||
key={`${pageMeta}-${index}`}
|
||||
onClick={() => {
|
||||
if (active) {
|
||||
return;
|
||||
}
|
||||
openPage(pageMeta.id);
|
||||
}}
|
||||
>
|
||||
{pageMeta.title || 'Untitled'}
|
||||
</StyledSubListItem>
|
||||
<div key={`${pageMeta}-${index}`}>
|
||||
<StyledSubListItem
|
||||
data-testid={`favorite-list-item-${pageMeta.id}`}
|
||||
active={active}
|
||||
onClick={() => {
|
||||
if (active) {
|
||||
return;
|
||||
}
|
||||
openPage(pageMeta.id);
|
||||
}}
|
||||
>
|
||||
{pageMeta.title || 'Untitled'}
|
||||
</StyledSubListItem>
|
||||
</div>
|
||||
);
|
||||
})}
|
||||
{favoriteList.length === 0 && (
|
||||
|
||||
Reference in New Issue
Block a user