chore: project publish modal improvement (#4422)

This commit is contained in:
Anmol Singh Bhatia 2024-05-10 15:25:16 +05:30 committed by GitHub
parent 27315a8aa2
commit dc77e4afdb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -139,13 +139,7 @@ export const PublishProjectModal: React.FC<Props> = observer((props) => {
const handlePublishProject = async (payload: IProjectPublishSettings) => {
if (!workspaceSlug) return;
return publishProject(workspaceSlug.toString(), project.id, payload)
.then((res) => {
handleClose();
// window.open(`${plane_deploy_url}/${workspaceSlug}/${project.id}`, "_blank");
return res;
})
.catch((err) => err);
return publishProject(workspaceSlug.toString(), project.id, payload);
};
const handleUpdatePublishSettings = async (payload: IProjectPublishSettings) => {
@ -174,10 +168,6 @@ export const PublishProjectModal: React.FC<Props> = observer((props) => {
setIsUnPublishing(true);
await unPublishProject(workspaceSlug.toString(), project.id, publishId)
.then((res) => {
handleClose();
return res;
})
.catch(() =>
setToast({
type: TOAST_TYPE.ERROR,