aboutsummaryrefslogtreecommitdiffstats
path: root/apps/web
diff options
context:
space:
mode:
Diffstat (limited to 'apps/web')
-rw-r--r--apps/web/components/dashboard/lists/BookmarkListSelector.tsx9
1 files changed, 7 insertions, 2 deletions
diff --git a/apps/web/components/dashboard/lists/BookmarkListSelector.tsx b/apps/web/components/dashboard/lists/BookmarkListSelector.tsx
index a267c692..7f916949 100644
--- a/apps/web/components/dashboard/lists/BookmarkListSelector.tsx
+++ b/apps/web/components/dashboard/lists/BookmarkListSelector.tsx
@@ -46,10 +46,15 @@ export function BookmarkListSelector({
}
allPaths = allPaths?.filter((path) => {
- if (hideBookmarkIds.includes(path[path.length - 1].id)) {
+ const lastItem = path[path.length - 1];
+ if (hideBookmarkIds.includes(lastItem.id)) {
return false;
}
- if (!listTypes.includes(path[path.length - 1].type)) {
+ if (!listTypes.includes(lastItem.type)) {
+ return false;
+ }
+ // Hide lists where user is a viewer (can't add/remove bookmarks)
+ if (lastItem.userRole === "viewer") {
return false;
}
if (!hideSubtreeOf) {