function BookmarkList(props) {
  const { bookmarkGroup } = props

  // Get the 'Bookmark' context data.
  const context = useContext(BookmarkContext)
  const { bookmarks, dispatch, openRightSideDrawer, updatePathname } = context

  // Execute side effect when browser mounts this component.
  useEffect(() => {
    updatePathname(bookmarkGroup)
  }, [updatePathname, bookmarkGroup])

  return !bookmarks[bookmarkGroup].length ? (
    <EmptyBookmark />
  ) : (
    bookmarks[bookmarkGroup].map((bookmark, index) => {
      return (
        <Bookmark
          key={index}
          bookmark={bookmark}
          openEditDrawer={openRightSideDrawer}
          dispatch={dispatch}
        />
      )
    })
  )
}
/** This is a component for displaying all 'Important' related bookmarks. */
This is a component for displaying all 'Important' related bookmarks.
This is a component for displaying all ' Important ' related bookmarks .
function BookmarkList(props) {
  const { bookmarkGroup } = props
  const context = useContext(BookmarkContext)
  const { bookmarks, dispatch, openRightSideDrawer, updatePathname } = context
  useEffect(() => {
    updatePathname(bookmarkGroup)
  }, [updatePathname, bookmarkGroup])
  return !bookmarks[bookmarkGroup].length ? (
    <EmptyBookmark />
  ) : (
    bookmarks[bookmarkGroup].map((bookmark, index) => {
      return (
        <Bookmark
          key={index}
          bookmark={bookmark}
          openEditDrawer={openRightSideDrawer}
          dispatch={dispatch}
        />
      )
    })
  )
}
function BookmarkList ( props ) { const { bookmarkGroup } = props const context = useContext ( BookmarkContext ) const { bookmarks , dispatch , openRightSideDrawer , updatePathname } = context useEffect ( ( ) => { updatePathname ( bookmarkGroup ) } , [ updatePathname , bookmarkGroup ] ) return ! bookmarks [ bookmarkGroup ] . length ? ( < EmptyBookmark / > ) : ( bookmarks [ bookmarkGroup ] . map ( ( bookmark , index ) => { return ( < Bookmark key = { index } bookmark = { bookmark } openEditDrawer = { openRightSideDrawer } dispatch = { dispatch } / > ) } ) ) }
This is a component for displaying all 'Important' related bookmarks.
This is a component for displaying all ' Important ' related bookmarks .
// Get the 'Bookmark' context data. // Execute side effect when browser mounts this component.