systemAlerts.tsx 480 B

1234567891011121314151617181920
  1. import AlertStore from 'sentry/stores/alertStore';
  2. import {useLegacyStore} from 'sentry/stores/useLegacyStore';
  3. import AlertMessage from './alertMessage';
  4. type Props = {className?: string};
  5. function SystemAlerts(props: Props) {
  6. const alerts = useLegacyStore(AlertStore);
  7. return (
  8. <div {...props}>
  9. {alerts.map((alert, index) => (
  10. <AlertMessage alert={alert} key={`${alert.id}-${index}`} system />
  11. ))}
  12. </div>
  13. );
  14. }
  15. export default SystemAlerts;