Skip to content

Commit

Permalink
[PLAT-835] Fix tastemaker twitter button (#3144)
Browse files Browse the repository at this point in the history
  • Loading branch information
dylanjeffers authored Apr 3, 2023
1 parent e68ada9 commit 4add953
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
import { push } from 'connected-react-router'
import { useDispatch } from 'react-redux'

import { make } from 'common/store/analytics/actions'
import { useSelector } from 'utils/reducer'

import { EntityLink } from './components/EntityLink'
Expand Down Expand Up @@ -57,10 +58,10 @@ export const TastemakerNotification = (props: TastemakerNotificationProps) => {
(trackOwnerHandle: string) => {
const trackTitle = track?.title || ''
const shareText = messages.twitterShare(trackOwnerHandle, trackTitle)
const analytics = {
eventName: Name.NOTIFICATIONS_CLICK_TASTEMAKER_TWITTER_SHARE,
text: shareText
}
const analytics = make(
Name.NOTIFICATIONS_CLICK_TASTEMAKER_TWITTER_SHARE,
{ text: shareText }
)
return { shareText: track ? shareText : '', analytics }
},
[track]
Expand All @@ -80,7 +81,6 @@ export const TastemakerNotification = (props: TastemakerNotificationProps) => {
<TwitterShareButton
type='dynamic'
handle={trackOwnerUser.handle}
// @ts-ignore -- TODO fix befere merge
shareData={handleShare}
/>
<NotificationFooter timeLabel={timeLabel} isViewed={isViewed} />
Expand Down

0 comments on commit 4add953

Please sign in to comment.