-
Notifications
You must be signed in to change notification settings - Fork 6
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: add remove button to pub page #987
Conversation
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.
oh good catch! that is kind of weird yeah, i will make it redirect |
@allisonking ive fixed this now, but the redirect can be a bit janky... eg if the actions after the pub has been removed take a long time, you will still see the "Not authorized page" to see this, replace this platform/core/app/components/pubs/RemovePubFormClient.tsx Lines 47 to 59 in 3d96e36
with const onSubmit = async () => {
const result = await runRemovePub({
pubId,
});
if (result && "success" in result) {
toast({
title: "Success",
description: result.report,
});
// simulating... a slow computer?
await new Promise((resolve) => setTimeout(resolve, 2_000));
closeForm();
}
}; Here in action Screen.Recording.2025-02-25.at.18.02.15.movThe alternative would be to add the redirect to the server action instead, but then we can't show the user a confirmation dialogue (easily). Do you think this is good enough? |
ah yeah I think that's ok for now! thanks for implementing it!! |
Issue(s) Resolved
Can't remove pub from pub page, only from Pub list or stages page.
High-level Explanation of PR
Just add the
PubRemoveButton
to/c/[communitySlug]/pubs/[pubId]
Test Plan
Screenshots (if applicable)
Notes