asyncView.tsx 627 B

123456789101112131415161718192021222324
  1. import * as React from 'react';
  2. import AsyncComponent from 'sentry/components/asyncComponent';
  3. import SentryDocumentTitle from 'sentry/components/sentryDocumentTitle';
  4. type AsyncViewState = AsyncComponent['state'];
  5. type AsyncViewProps = AsyncComponent['props'];
  6. export default class AsyncView<
  7. P extends AsyncViewProps = AsyncViewProps,
  8. S extends AsyncViewState = AsyncViewState
  9. > extends AsyncComponent<P, S> {
  10. getTitle() {
  11. return '';
  12. }
  13. render() {
  14. return (
  15. <SentryDocumentTitle title={this.getTitle()}>
  16. {this.renderComponent() as React.ReactChild}
  17. </SentryDocumentTitle>
  18. );
  19. }
  20. }