-
Notifications
You must be signed in to change notification settings - Fork 79
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
feat(core): add delete address functionality for account #787
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
2 Ignored Deployments
|
🦋 Changeset detectedLatest commit: b20168c The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
||
if (startCursor) { | ||
beforeSearchParams.set('before', String(startCursor)); | ||
} |
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.
FYI, I've experienced issues with navigation on deleting last item on page (like Customer's address). After the action I've received url like https://your-store/addresses?before=null
which prevents smooth navigation afterwards. So I've put this condition and if there is no cursor we just basically return start position for pagination.
417f437
to
cd51301
Compare
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.
Can you please attach a PoL to this PR?
apps/core/messages/en.json
Outdated
"deleteButton": "Delete" | ||
"deleteButton": "Delete", | ||
"confirmDeleteAddress": "Delete address", | ||
"deleteModalTitle": "Are you sure you want to delete Address" |
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.
🍹 We can probably change this to Are you sure you want to delete address?
or Are you sure?
if we show the Delete Address
somewhere within the dialog
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.
Thanks, Anudeep. It's updated.
revalidatePath('/account/addresses', 'page'); | ||
|
||
if (response.customer.deleteCustomerAddress.errors.length === 0) { | ||
return { status: 'success', message: 'The address has been deleted' }; |
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.
🍹 This address has been deleted
ef17a1e
to
91b8f10
Compare
91b8f10
to
b8570e8
Compare
b8570e8
to
db6fa78
Compare
db6fa78
to
f35b5d2
Compare
3ff572e
to
f89bc86
Compare
f89bc86
to
1eecf0d
Compare
1eecf0d
to
13cde88
Compare
13cde88
to
635d862
Compare
635d862
to
c162f89
Compare
c162f89
to
97aa379
Compare
97aa379
to
bd343d0
Compare
bd343d0
to
b20168c
Compare
⚡️🏠 Lighthouse reportLighthouse ran against https://catalyst-latest-n8umgdnq3-bigcommerce-platform.vercel.app 🖥️ DesktopWe ran Lighthouse against the changes on a desktop and produced this report. Here's the summary:
📱 MobileWe ran Lighthouse against the changes on a mobile and produced this report. Here's the summary:
|
What/Why?
This PR brings
delete
address functionality for Account.Testing
locally