Skip to content

Commit

Permalink
feat: add an extra to twitter share msg
Browse files Browse the repository at this point in the history
  • Loading branch information
alfetopito committed Jul 4, 2023
1 parent 9582add commit 6539aab
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/common/pure/TransactionSubmittedContent/SurplusModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,6 @@ import { TokenAmount } from 'common/pure/TokenAmount'
const SELL_SURPLUS_WORD = 'got'
const BUY_SURPLUS_WORD = 'saved'

function getTwitterText(surplusAmount: string, surplusToken: string, orderKind: OrderKind) {
const actionWord = orderKind === OrderKind.SELL ? SELL_SURPLUS_WORD : BUY_SURPLUS_WORD
const surplus = `${surplusAmount} ${surplusToken}`
return encodeURIComponent(`Hey, I just ${actionWord} ${surplus} on @CoWSwap! 🐮💸\n\nStart swapping on swap.cow.fi`)
}

export const Wrapper = styled.div`
--borderRadius: 16px;
display: flex;
Expand Down Expand Up @@ -202,3 +196,11 @@ export function SurplusModal(props: SurplusModalProps) {
</Wrapper>
)
}

function getTwitterText(surplusAmount: string, surplusToken: string, orderKind: OrderKind) {
const actionWord = orderKind === OrderKind.SELL ? SELL_SURPLUS_WORD : BUY_SURPLUS_WORD
const surplus = `${surplusAmount} ${surplusToken}`
return encodeURIComponent(
`Hey, I just ${actionWord} an extra ${surplus} on @CoWSwap! 🐮💸\n\nStart swapping on swap.cow.fi`
)
}

0 comments on commit 6539aab

Please sign in to comment.