organizationSettingsLayout.tsx 890 B

1234567891011121314151617181920212223242526272829303132
  1. import {Fragment} from 'react';
  2. import {usePrefersStackedNav} from 'sentry/components/nav/prefersStackedNav';
  3. import type {RouteComponentProps} from 'sentry/types/legacyReactRouter';
  4. import SettingsLayout from 'sentry/views/settings/components/settingsLayout';
  5. import OrganizationSettingsNavigation from 'sentry/views/settings/organization/organizationSettingsNavigation';
  6. type Props = RouteComponentProps & {
  7. children: React.ReactNode;
  8. };
  9. function OrganizationSettingsLayout(props: Props) {
  10. const prefersStackedNav = usePrefersStackedNav();
  11. if (prefersStackedNav) {
  12. return (
  13. <Fragment>
  14. <OrganizationSettingsNavigation />
  15. <SettingsLayout {...props} />
  16. </Fragment>
  17. );
  18. }
  19. return (
  20. <SettingsLayout
  21. {...props}
  22. renderNavigation={() => <OrganizationSettingsNavigation />}
  23. />
  24. );
  25. }
  26. export default OrganizationSettingsLayout;