11import React , { useCallback , useEffect , useState } from 'react'
22import { BiBookmarkMinus , BiBookmarkPlus , BiShareAlt } from 'react-icons/bi'
3- import { MdBugReport } from 'react-icons/md'
4- import { reportLink } from 'src/config'
53import { ShareModal } from 'src/features/shareModal'
64import { ShareModalData } from 'src/features/shareModal/types'
75import { Attributes , trackLinkBookmark , trackLinkUnBookmark } from 'src/lib/analytics'
86import { useBookmarks } from 'src/stores/bookmarks'
9- import { useUserPreferences } from 'src/stores/preferences'
107
118type CardItemWithActionsProps = {
129 item : {
@@ -72,14 +69,6 @@ export const CardItemWithActions = ({
7269 const onShareModalClicked = useCallback ( ( ) => {
7370 setShareModalData ( { title : item . title , link : item . url , source : source } )
7471 } , [ item . title , item . url , source ] )
75-
76- const onReportClicked = useCallback ( ( ) => {
77- const tags = useUserPreferences
78- . getState ( )
79- . userSelectedTags . map ( ( tag ) => tag . label . toLocaleLowerCase ( ) )
80- window . open ( `${ reportLink } ?tags=${ tags . join ( ',' ) } &url=${ item . url } ` , '_blank' )
81- } , [ item . url ] )
82-
8372 return (
8473 < div key = { item . id } className = "blockRow" >
8574 < ShareModal
@@ -89,14 +78,6 @@ export const CardItemWithActions = ({
8978 />
9079 { cardItem }
9180 < div className = { `blockActions ${ isBookmarked ? 'active' : '' } ` } >
92- { source === 'ai' && (
93- < button
94- className = { `blockActionButton ` }
95- onClick = { onReportClicked }
96- aria-label = "Report item" >
97- < MdBugReport />
98- </ button >
99- ) }
10081 < button
10182 className = { `blockActionButton ` }
10283 onClick = { onShareModalClicked }
0 commit comments