notificationSettingsController.tsx 736 B

1234567891011121314151617181920212223
  1. import type {RouteComponentProps} from 'react-router';
  2. import LoadingIndicator from 'sentry/components/loadingIndicator';
  3. import type {Organization} from 'sentry/types';
  4. import withOrganizations from 'sentry/utils/withOrganizations';
  5. import NotificationSettings from './notificationSettings';
  6. interface NotificationSettingsControllerProps extends RouteComponentProps<{}, {}> {
  7. organizations: Organization[];
  8. organizationsLoading?: boolean;
  9. }
  10. export function NotificationSettingsController({
  11. organizationsLoading,
  12. }: NotificationSettingsControllerProps) {
  13. if (organizationsLoading) {
  14. return <LoadingIndicator />;
  15. }
  16. return <NotificationSettings />;
  17. }
  18. export default withOrganizations(NotificationSettingsController);