Skip to content

Commit

Permalink
fix(onboarding): save integration notification configurations on proj…
Browse files Browse the repository at this point in the history
…ect creation page (#79461)

fix problem of integration notification configurations being reset every
time the user deselected "Notify via integration" or selected "I'll
create my own alerts later"


https://github.com/user-attachments/assets/6c9759ba-ffe0-49d2-8660-1b9d94c4822d
  • Loading branch information
ameliahsu authored Oct 21, 2024
1 parent ac7694a commit dea9941
Showing 1 changed file with 1 addition and 12 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {useEffect, useMemo} from 'react';
import {useMemo} from 'react';
import styled from '@emotion/styled';

import SelectControl from 'sentry/components/forms/controls/selectControl';
Expand Down Expand Up @@ -38,17 +38,6 @@ export default function MessagingIntegrationAlertRule({
[providersToIntegrations, provider]
);

useEffect(() => {
const providerKeys = Object.keys(providersToIntegrations);
if (providerKeys.length > 0) {
const firstProvider = providerKeys[0];
setProvider(firstProvider);

const firstIntegration = providersToIntegrations[firstProvider][0];
setIntegration(firstIntegration);
}
}, [providersToIntegrations, setProvider, setIntegration]);

if (!provider) {
return null;
}
Expand Down

0 comments on commit dea9941

Please sign in to comment.