fix: stack integration disable button mutation issue in project settings. (#3402)

This commit is contained in:
Prateek Shourya 2024-01-18 12:31:10 +05:30 committed by sriram veeraghanta
parent 4ab64b6905
commit 1adb38655a

View File

@ -66,8 +66,9 @@ export const SelectChannel: React.FC<Props> = observer(({ integration }) => {
}, [projectIntegration, projectId]);
const handleDelete = async () => {
if (!workspaceSlug || !projectId) return;
if (projectIntegration.length === 0) return;
mutate(SLACK_CHANNEL_INFO, (prevData: any) => {
mutate(SLACK_CHANNEL_INFO(workspaceSlug?.toString(), projectId?.toString()), (prevData: any) => {
if (!prevData) return;
return prevData.id !== integration.id;
}).then(() => {