Browse Source

ref(js): Convert UnlinkedAlert to a FC (#34632)

Evan Purkhiser 2 years ago
parent
commit
60d05282a4
1 changed files with 14 additions and 17 deletions
  1. 14 17
      static/app/views/settings/account/notifications/unlinkedAlert.tsx

+ 14 - 17
static/app/views/settings/account/notifications/unlinkedAlert.tsx

@@ -1,4 +1,3 @@
-import {Component} from 'react';
 import styled from '@emotion/styled';
 
 import Alert from 'sentry/components/alert';
@@ -9,23 +8,21 @@ type Props = {
   organizations: OrganizationSummary[];
 };
 
-class UnlinkedAlert extends Component<Props> {
-  render() {
-    const {organizations} = this.props;
-    return (
-      <StyledAlert type="warning" showIcon>
-        {t(
-          'You\'ve selected Slack as your delivery method, but do not have a linked account for the following organizations. You\'ll receive email notifications instead until you type "/sentry link" into your Slack workspace to link your account. If slash commands are not working, please re-install the Slack integration.'
-        )}
-        <ul>
-          {organizations.map(organization => (
-            <li key={organization.id}>{organization.slug}</li>
-          ))}
-        </ul>
-      </StyledAlert>
-    );
-  }
+function UnlinkedAlert({organizations}: Props) {
+  return (
+    <StyledAlert type="warning" showIcon>
+      {t(
+        'You\'ve selected Slack as your delivery method, but do not have a linked account for the following organizations. You\'ll receive email notifications instead until you type "/sentry link" into your Slack workspace to link your account. If slash commands are not working, please re-install the Slack integration.'
+      )}
+      <ul>
+        {organizations.map(organization => (
+          <li key={organization.id}>{organization.slug}</li>
+        ))}
+      </ul>
+    </StyledAlert>
+  );
 }
+
 const StyledAlert = styled(Alert)`
   margin: 20px 0px;
 `;