Skip to content

Commit a013c4b

Browse files
committed
refactor: remove reporting functionality from CardItemWithActions component
1 parent 1b1911e commit a013c4b

File tree

1 file changed

+0
-19
lines changed

1 file changed

+0
-19
lines changed

src/components/Elements/CardWithActions/CardItemWithActions.tsx

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
import React, { useCallback, useEffect, useState } from 'react'
22
import { BiBookmarkMinus, BiBookmarkPlus, BiShareAlt } from 'react-icons/bi'
3-
import { MdBugReport } from 'react-icons/md'
4-
import { reportLink } from 'src/config'
53
import { ShareModal } from 'src/features/shareModal'
64
import { ShareModalData } from 'src/features/shareModal/types'
75
import { Attributes, trackLinkBookmark, trackLinkUnBookmark } from 'src/lib/analytics'
86
import { useBookmarks } from 'src/stores/bookmarks'
9-
import { useUserPreferences } from 'src/stores/preferences'
107

118
type 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

Comments
 (0)