Просмотр исходного кода

feat(alerts): read from query param to determine alert type (#34529)

read from query param to determine alert type
Stephen Cefali 2 лет назад
Родитель
Сommit
49b0115427
1 измененных файлов с 4 добавлено и 1 удалено
  1. 4 1
      static/app/views/alerts/wizard/index.tsx

+ 4 - 1
static/app/views/alerts/wizard/index.tsx

@@ -49,7 +49,10 @@ const DEFAULT_ALERT_OPTION = 'issues';
 
 class AlertWizard extends Component<Props, State> {
   state: State = {
-    alertOption: DEFAULT_ALERT_OPTION,
+    alertOption:
+      this.props.location.query.alert_option in AlertWizardAlertNames
+        ? this.props.location.query.alert_option
+        : DEFAULT_ALERT_OPTION,
   };
 
   componentDidMount() {