Skip to content

Commit

Permalink
remove bookmarks
Browse files Browse the repository at this point in the history
  • Loading branch information
fiskus committed Oct 8, 2024
1 parent c8e16fb commit fbb608f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
3 changes: 2 additions & 1 deletion catalog/app/containers/Bucket/PackageTree/PackageTree.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,9 @@ function SelectionWidget({ className, selection, onSelection }: SelectionWidgetP
</M.DialogTitle>
<M.DialogContent>
<Selection.Dashboard
onSelection={onSelection}
onDone={close}
onSelection={onSelection}
packages
selection={selection}
/>
</M.DialogContent>
Expand Down
14 changes: 12 additions & 2 deletions catalog/app/containers/Bucket/Selection/Dashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -128,14 +128,24 @@ interface DashboardProps {
onDone: () => void
onSelection: (changed: ListingSelection) => void
selection: ListingSelection
packages?: boolean
}

export default function Dashboard({ onDone, onSelection, selection }: DashboardProps) {
export default function Dashboard({
onDone,
onSelection,
selection,
packages = false,
}: DashboardProps) {
const classes = useStyles()
const lists = React.useMemo(() => toHandlesMap(selection), [selection])
const hasSelection = Object.values(selection).some((ids) => !!ids.length)

const bookmarks = Bookmarks.use()
const bookmarksCtx = Bookmarks.use()
const bookmarks = React.useMemo(
() => !packages && bookmarksCtx,
[packages, bookmarksCtx],
)
const hasSomethingToBookmark = React.useMemo(
() =>
bookmarks &&
Expand Down

0 comments on commit fbb608f

Please sign in to comment.