-
Notifications
You must be signed in to change notification settings - Fork 591
chore: partner-offer - standardise conversation offer CTA #13736
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -41,9 +41,9 @@ export const PartnerOfferCreatedNotification: React.FC<PartnerOfferCreatedNotifi | |
| const noLongerAvailable = !item?.partnerOffer?.isAvailable | ||
| const isOfferFromSaves = item?.partnerOffer?.source === "SAVE" | ||
|
|
||
| let subtitle = isOfferFromSaves | ||
| let subtitle: string | null = isOfferFromSaves | ||
| ? "Review the offer on your saved artwork" | ||
| : "Review the offer before it expires" | ||
| : null | ||
|
|
||
| if (noLongerAvailable) { | ||
| subtitle = | ||
|
|
@@ -87,7 +87,7 @@ export const PartnerOfferCreatedNotification: React.FC<PartnerOfferCreatedNotifi | |
|
|
||
| <Spacer y={0.5} /> | ||
|
|
||
| <Text variant="sm-display">{subtitle}</Text> | ||
| {!!subtitle && <Text variant="sm-display">{subtitle}</Text>} | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In fact as it now only one possible case I would just inline it here. Subtitle is always the same now so we could text |
||
|
|
||
| <Spacer y={0.5} /> | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -60,7 +60,7 @@ describe("PartnerOfferCreatedNotification", () => { | |
| expect(screen.getByText("$405,000")).toBeOnTheScreen() | ||
| expect(screen.getByText(/List price:\s*\$450,000\s*/)).toBeOnTheScreen() | ||
| expect(screen.getByText('"This is a note from the gallery"')).toBeOnTheScreen() | ||
| expect(screen.getByText("Review the offer before it expires")).toBeOnTheScreen() | ||
| expect(screen.queryByText("Review the offer before it expires")).not.toBeOnTheScreen() | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. With this changes this |
||
| expect(screen.queryByText("Review the offer on your saved artwork")).not.toBeOnTheScreen() | ||
| expect(screen.queryByText("Manage Saves")).not.toBeOnTheScreen() | ||
| }) | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
think in cases like this
&&reads better. Something likesubtitle = isOfferFromSaves && xxx