mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
chore: remove redundant console logs (#868)
This commit is contained in:
parent
5f20e65ca6
commit
fa5c994ddc
@ -50,7 +50,7 @@ export const EmailPasswordForm = ({ onSuccess }: any) => {
|
||||
if (!error?.response?.data) return;
|
||||
Object.keys(error.response.data).forEach((key) => {
|
||||
const err = error.response.data[key];
|
||||
console.log("err", err);
|
||||
console.log(err);
|
||||
setError(key as keyof EmailPasswordFormValues, {
|
||||
type: "manual",
|
||||
message: Array.isArray(err) ? err.join(", ") : err,
|
||||
|
@ -315,9 +315,6 @@ export const IssuesView: React.FC<Props> = ({
|
||||
cycleId as string,
|
||||
bridgeId
|
||||
)
|
||||
.then((res) => {
|
||||
console.log(res);
|
||||
})
|
||||
.catch((e) => {
|
||||
console.log(e);
|
||||
});
|
||||
@ -338,9 +335,6 @@ export const IssuesView: React.FC<Props> = ({
|
||||
moduleId as string,
|
||||
bridgeId
|
||||
)
|
||||
.then((res) => {
|
||||
console.log(res);
|
||||
})
|
||||
.catch((e) => {
|
||||
console.log(e);
|
||||
});
|
||||
|
@ -92,13 +92,8 @@ export const CycleDetailsSidebar: React.FC<Props> = ({
|
||||
|
||||
cyclesService
|
||||
.patchCycle(workspaceSlug as string, projectId as string, cycleId as string, data)
|
||||
.then((res) => {
|
||||
console.log(res);
|
||||
mutate(CYCLE_DETAILS(cycleId as string));
|
||||
})
|
||||
.catch((e) => {
|
||||
console.log(e);
|
||||
});
|
||||
.then(() => mutate(CYCLE_DETAILS(cycleId as string)))
|
||||
.catch((e) => console.log(e));
|
||||
};
|
||||
|
||||
const handleCopyText = () => {
|
||||
|
@ -94,9 +94,7 @@ export const CreateUpdateEstimateModal: React.FC<Props> = ({ handleClose, data,
|
||||
|
||||
await estimatesService
|
||||
.patchEstimate(workspaceSlug as string, projectId as string, data?.id as string, payload)
|
||||
.then(() => {
|
||||
handleClose();
|
||||
})
|
||||
.then(() => handleClose())
|
||||
.catch(() => {
|
||||
setToastAlert({
|
||||
type: "error",
|
||||
|
@ -157,10 +157,7 @@ export const IssueActivitySection: React.FC<Props> = () => {
|
||||
issueId as string,
|
||||
commentId
|
||||
)
|
||||
.then((response) => {
|
||||
mutateIssueActivities();
|
||||
console.log(response);
|
||||
});
|
||||
.then(() => mutateIssueActivities());
|
||||
};
|
||||
|
||||
const getLabelColor = (labelId: string) => {
|
||||
|
@ -78,8 +78,7 @@ export const CreateUpdateLabelInline = forwardRef<Ref, Props>(function CreateUpd
|
||||
labelToUpdate?.id ?? "",
|
||||
formData
|
||||
)
|
||||
.then((res) => {
|
||||
console.log(res);
|
||||
.then(() => {
|
||||
reset(defaultValues);
|
||||
mutate<IIssueLabels[]>(
|
||||
PROJECT_ISSUE_LABELS(projectId as string),
|
||||
|
@ -61,10 +61,7 @@ export const LabelsListModal: React.FC<Props> = ({ isOpen, handleClose, parent }
|
||||
.patchIssueLabel(workspaceSlug as string, projectId as string, label.id, {
|
||||
parent: parent?.id ?? "",
|
||||
})
|
||||
.then((res) => {
|
||||
console.log(res);
|
||||
mutate();
|
||||
});
|
||||
.then(() => mutate());
|
||||
};
|
||||
|
||||
return (
|
||||
|
@ -87,13 +87,8 @@ export const ModuleDetailsSidebar: React.FC<Props> = ({ issues, module, isOpen,
|
||||
|
||||
modulesService
|
||||
.patchModule(workspaceSlug as string, projectId as string, moduleId as string, data)
|
||||
.then((res) => {
|
||||
console.log(res);
|
||||
mutate(MODULE_DETAILS(moduleId as string));
|
||||
})
|
||||
.catch((e) => {
|
||||
console.log(e);
|
||||
});
|
||||
.then(() => mutate(MODULE_DETAILS(moduleId as string)))
|
||||
.catch((e) => console.log(e));
|
||||
};
|
||||
|
||||
const handleCreateLink = async (formData: ModuleLink) => {
|
||||
|
@ -24,17 +24,14 @@ export const InviteMembers: React.FC<Props> = ({ setStep, workspace }) => {
|
||||
const onSubmit = async (formData: IUser) => {
|
||||
await workspaceService
|
||||
.inviteWorkspace(workspace.slug, formData)
|
||||
.then((res) => {
|
||||
console.log(res);
|
||||
.then(() => {
|
||||
setToastAlert({
|
||||
type: "success",
|
||||
title: "Invitations sent!",
|
||||
});
|
||||
setStep(4);
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
});
|
||||
.catch((err) => console.log(err));
|
||||
};
|
||||
|
||||
return (
|
||||
|
@ -58,7 +58,6 @@ export const SingleIntegration: React.FC<Props> = ({ integration }) => {
|
||||
url: html_url,
|
||||
})
|
||||
.then((res) => {
|
||||
console.log(res);
|
||||
mutate(PROJECT_GITHUB_REPOSITORY(projectId as string));
|
||||
|
||||
setToastAlert({
|
||||
|
@ -51,11 +51,7 @@ export const CustomFloatingToolbar: React.FC<Props> = ({ gptOption, editorState
|
||||
</div>
|
||||
{gptOption && (
|
||||
<div className="flex items-center gap-x-1 px-2">
|
||||
<button
|
||||
type="button"
|
||||
className="rounded py-1 px-1.5 text-xs hover:bg-gray-100"
|
||||
onClick={() => console.log(editorState.selection.$anchor.nodeBefore)}
|
||||
>
|
||||
<button type="button" className="rounded py-1 px-1.5 text-xs hover:bg-gray-100">
|
||||
AI
|
||||
</button>
|
||||
</div>
|
||||
|
@ -56,7 +56,6 @@ const SendWorkspaceInvitationModal: React.FC<Props> = ({
|
||||
await workspaceService
|
||||
.inviteWorkspace(workspace_slug, { emails: [formData] })
|
||||
.then((res) => {
|
||||
console.log(res);
|
||||
setIsOpen(false);
|
||||
handleClose();
|
||||
mutate(WORKSPACE_INVITATIONS, (prevData: any) => [
|
||||
@ -64,9 +63,9 @@ const SendWorkspaceInvitationModal: React.FC<Props> = ({
|
||||
...(prevData ?? []),
|
||||
]);
|
||||
setToastAlert({
|
||||
title: "Success",
|
||||
type: "success",
|
||||
message: "Member invited successfully",
|
||||
title: "Success!",
|
||||
message: "Member invited successfully.",
|
||||
});
|
||||
})
|
||||
.catch((err) => console.log(err));
|
||||
|
@ -36,11 +36,7 @@ const fallbackCopyTextToClipboard = (text: string) => {
|
||||
// FIXME: Even though we are using this as a fallback, execCommand is deprecated 👎. We should find a better way to do this.
|
||||
// https://developer.mozilla.org/en-US/docs/Web/API/Document/execCommand
|
||||
var successful = document.execCommand("copy");
|
||||
var msg = successful ? "successful" : "unsuccessful";
|
||||
console.log("Fallback: Copying text command was " + msg);
|
||||
} catch (err) {
|
||||
console.error("Fallback: Oops, unable to copy", err);
|
||||
}
|
||||
} catch (err) {}
|
||||
|
||||
document.body.removeChild(textArea);
|
||||
};
|
||||
|
@ -94,11 +94,8 @@ const SingleModule: React.FC = () => {
|
||||
|
||||
await modulesService
|
||||
.addIssuesToModule(workspaceSlug as string, projectId as string, moduleId as string, data)
|
||||
.then((res) => {
|
||||
console.log(res);
|
||||
mutate(MODULE_ISSUES(moduleId as string));
|
||||
})
|
||||
.catch((e) =>
|
||||
.then(() => mutate(MODULE_ISSUES(moduleId as string)))
|
||||
.catch(() =>
|
||||
setToastAlert({
|
||||
type: "error",
|
||||
title: "Error!",
|
||||
|
@ -81,12 +81,7 @@ const LabelsSettings: NextPage = () => {
|
||||
mutate((prevData) => prevData?.filter((p) => p.id !== labelId), false);
|
||||
issuesService
|
||||
.deleteIssueLabel(workspaceSlug as string, projectDetails.id, labelId)
|
||||
.then((res) => {
|
||||
console.log(res);
|
||||
})
|
||||
.catch((e) => {
|
||||
console.log(e);
|
||||
});
|
||||
.catch((e) => console.log(e));
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user