Skip to content

Commit

Permalink
💬 SquadsX notification text
Browse files Browse the repository at this point in the history
  • Loading branch information
edsolater committed Feb 22, 2024
1 parent 894320e commit c96c4ba
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/components/NotificationItem/TxNotificationItemCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -128,16 +128,21 @@ export function TxNotificationItemCard({
(adapter?.name === 'SquadsX'
? `Transaction initiated! (${innerTxInfos[0].historyInfo.title})`
: `${innerTxInfos[0].historyInfo.title} Confirmed!`)

const errorTitle =
innerTxInfos[0].historyInfo.forceErrorTitle ??
(adapter?.name === 'SquadsX'
? `Transaction initiation (${innerTxInfos[0].historyInfo.title}) failed!`
: `${innerTxInfos[0].historyInfo.title} Error!`)
const description =

const descriptionWhenProcessing = innerTxInfos[0].historyInfo.description

const descriptionWhenSuccess =
adapter?.name === 'SquadsX'
? `${innerTxInfos[0].historyInfo.description}
You can now cast votes for this proposal on the Squads app.`
: innerTxInfos[0].historyInfo.description

return (
<Card
domRef={itemRef}
Expand Down Expand Up @@ -168,7 +173,7 @@ You can now cast votes for this proposal on the Squads app.`
/>
<Row className="gap-3 px-2 mobile:px-0">
<div>
<Row className="gap-3 mb-5">
<Row className="gap-3 mb-3">
<Icon heroIconName={colors[wholeItemState].heroIconName} className={colors[wholeItemState].text} />
<div>
<div className="font-medium text-base mobile:p-0 mobile:text-sm text-white">
Expand All @@ -181,7 +186,7 @@ You can now cast votes for this proposal on the Squads app.`
: `Confirming transaction...`}
</div>
<div className="font-medium text-sm whitespace-pre-wrap mobile:text-sm text-[#abc4ff] mt-1">
{description}
{wholeItemState === 'success' ? descriptionWhenSuccess : descriptionWhenProcessing}
</div>
</div>
</Row>
Expand Down

0 comments on commit c96c4ba

Please sign in to comment.