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 GitHub
parent 615ccf9459
commit 6e1cd4194a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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(() => {