notificationSettingsController.tsx 766 B

12345678910111213141516171819202122
  1. import LoadingIndicator from 'sentry/components/loadingIndicator';
  2. import type {RouteComponentProps} from 'sentry/types/legacyReactRouter';
  3. import type {Organization} from 'sentry/types/organization';
  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);