Skip to content

Commit

Permalink
chore: Merge branch 'bugix-patch-1' into staging
Browse files Browse the repository at this point in the history
  • Loading branch information
bdebon committed Nov 24, 2022
2 parents ab07947 + d0f1506 commit 75d54c5
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions libs/shared/ui/src/lib/share-twitter/share-twitter.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { TwitterIcon, TwitterShareButton } from 'next-share'
import { useCallback } from 'react'
import { push } from "@socialgouv/matomo-next";
import { LogPayload } from '../constants/tracking';
import { push } from '@socialgouv/matomo-next'
import { LogPayload } from '../constants/tracking'

export interface ShareTwitterProps {
websiteUrl: string
Expand All @@ -14,16 +14,16 @@ export function ShareTwitter(props: ShareTwitterProps) {
const showResultButton = props.showResult
? `transition-opacity duration-300 delay-700 !opacity-100`
: `opacity-0 pointer-events-none`

const onTwitterShare = useCallback(() => {
push([...LogPayload.twitterShare, questionSlug]);
push([...LogPayload.twitterShare, questionSlug])
}, [])

return (
<TwitterShareButton
onClick={onTwitterShare}
url={`${websiteUrl}/question/${questionSlug}/`}
title={`You won't believe what people voted on this one...`}
title={`You won't believe what people voted on this one... #choiceofdev`}
>
<div
className={`left-1/2 -translate-x-1/2 flex items-center justify-center gap-2 !delay-1000 !duration-500 absolute bottom-16 lg:bottom-14 -translate-y-full ${
Expand Down

0 comments on commit 75d54c5

Please sign in to comment.