-
Notifications
You must be signed in to change notification settings - Fork 223
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
Unsubscription from monthly report confirmation page #4998
Conversation
Preview URL 🚀 : https://blurts-server-pr-4998-mgjlpikfea-uk.a.run.app |
4fe81c5
to
3d6d35e
Compare
const handleUnsubscription = async () => { | ||
try { | ||
const response = await fetch(`/api/unsubscribe?token=${token}`, { | ||
method: "GET", | ||
}); | ||
|
||
if (response.ok) { | ||
setUnsubscribeSuccess(true); | ||
} | ||
} catch (e) { | ||
console.error("Error during unsubscription:", e); | ||
} | ||
}; |
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.
@Vinnl Do you know how to retrieve the users' email without having to query it from the URL?
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.
I was hoping that wouldn't be necessary - see #4988 (comment).
Cleanup completed - database 'blurts-server-pr-4998' destroyed, cloud run service 'blurts-server-pr-4998' destroyed |
* fix: gurantee boolean value * fix: update should upsert too * fix: delete primary_email field * fix: remove dup primary_email from new table * fix: generate the link for the unsub page instead * feat: some example code for FE * extract data from the right table * Unsubscription from monthly report confirmation page * pass in the right function * fix unit tests * fix unit tests --------- Co-authored-by: Joey Zhou <[email protected]>
* fix: gurantee boolean value * fix: update should upsert too * fix: delete primary_email field * fix: remove dup primary_email from new table * fix: generate the link for the unsub page instead * feat: some example code for FE * extract data from the right table * Unsubscription from monthly report confirmation page * pass in the right function * fix unit tests * fix unit tests --------- Co-authored-by: Joey Zhou <[email protected]>
* fix: gurantee boolean value * fix: update should upsert too * fix: delete primary_email field * fix: remove dup primary_email from new table * fix: generate the link for the unsub page instead * feat: some example code for FE * extract data from the right table * Unsubscription from monthly report confirmation page * pass in the right function * fix unit tests * fix unit tests --------- Co-authored-by: Joey Zhou <[email protected]>
* feat: some example code for FE * extract data from the right table * Unsubscription from monthly report confirmation page (#4998) * fix: gurantee boolean value * fix: update should upsert too * fix: delete primary_email field * fix: remove dup primary_email from new table * fix: generate the link for the unsub page instead * feat: some example code for FE * extract data from the right table * Unsubscription from monthly report confirmation page * pass in the right function * fix unit tests * fix unit tests --------- Co-authored-by: Joey Zhou <[email protected]> * pass subscriber data * return void * add toast * correct api endpoint * remove debugging comments * add try again link * add feature flag * rename file * override css variables * wrap in try catch * add loader * fixup * add toat if catch error * remove original css override styles * move to /unsubscribe-email folder * lint * add try again styling * use plus language for header * unit test --------- Co-authored-by: Kaitlyn <[email protected]>
References:
Jira: MNTOR-3556
Figma:https://www.figma.com/design/CaEKIhvSJqf6KNIMzSkt40/Concepts-for-Monitor-MVP-Redesign?node-id=2298-89690&node-type=FRAME&t=nkcj8ZpN91IIOPgD-0
Description
Screenshot (if applicable)
preview at http://localhost:6060/unsubscribe-from-monthly-report
Not applicable.
How to test
Checklist (Definition of Done)