Skip to content

Commit

Permalink
chore: add title and body for share post
Browse files Browse the repository at this point in the history
  • Loading branch information
teodorus-nathaniel committed Feb 2, 2024
1 parent 79d8fb2 commit 9315134
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/components/leaderboard/ProgressModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -222,9 +222,18 @@ function ProgressPanel({
}

const shareOnPolkaverse = () => {
const { isZero, value } = formatSUB(data?.earned)
const title = `I earned ${isZero ? '' : `${value} `} SUB ${
isUsingLastWeekData ? 'last week for my activity' : 'yesterday'
} on @SubsocialChain!`
const desc = "Let's be active in Polkaverse to join The Creator Economy!"
generateImage(image => {
window.open(
fullUrl(`${defaultSpaceIdToPost}/posts/new?image=${encodeURIComponent(image)}`),
fullUrl(
`${defaultSpaceIdToPost}/posts/new?image=${encodeURIComponent(
image,
)}&title=${encodeURIComponent(title)}&body=${encodeURIComponent(desc)}`,
),
'_blank',
)
})
Expand Down

0 comments on commit 9315134

Please sign in to comment.