Skip to content
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

MNTOR-3556: Front end integration #4995

Merged
merged 22 commits into from
Sep 13, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,14 @@
max-width: $content-xs;
}
}

.tryAgain {
color: $color-white;
font-weight: 600;
text-decoration: underline;
background: none;
border: none;
padding: 0;
margin: 0;
cursor: pointer;
}
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@ export const UnsubscribeMonthlyReportView = ({ token }: { token: string }) => {
});

if (!response.ok) {
toast(
toast.error(
l10n.getFragment("unsubscription-failed", {
elems: {
try_again_link: (
<Button
variant="link"
onPress={() => void handleUnsubscription()}
<button
className={styles.tryAgain}
onClick={() => void handleUnsubscription()}
/>
),
},
Expand All @@ -54,13 +54,13 @@ export const UnsubscribeMonthlyReportView = ({ token }: { token: string }) => {
setUnsubscribeSuccess(true);
}
} catch (error) {
toast(
toast.error(
l10n.getFragment("unsubscription-failed", {
elems: {
try_again_link: (
<Button
variant="link"
onPress={() => void handleUnsubscription()}
<button
Copy link
Collaborator

@codemist codemist Sep 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I decided to resort to a default <button> element here as opposed to using the pre-made Button component + link variant because this is a unique button that's in white, which would require overriding the blue-set colour to the link <Button> variant.

className={styles.tryAgain}
onClick={() => void handleUnsubscription()}
/>
),
},
Expand Down
Loading