mirror of
https://github.com/hanzoai/sentinel.git
synced 2026-09-29 22:34:33 +00:00
35 lines
1.1 KiB
TypeScript
35 lines
1.1 KiB
TypeScript
import {useContext} from 'react';
|
|
|
|
import AppStoreConnectContext from 'sentry/components/projects/appStoreConnectContext';
|
|
import type {Organization, Project} from 'sentry/types';
|
|
import withProject from 'sentry/utils/withProject';
|
|
import SettingsNavigation from 'sentry/views/settings/components/settingsNavigation';
|
|
import getConfiguration from 'sentry/views/settings/project/navigationConfiguration';
|
|
|
|
type Props = {
|
|
organization: Organization;
|
|
project?: Project;
|
|
};
|
|
|
|
function ProjectSettingsNavigation({organization, project}: Props) {
|
|
const appStoreConnectContext = useContext(AppStoreConnectContext);
|
|
|
|
const debugFilesNeedsReview = appStoreConnectContext
|
|
? Object.keys(appStoreConnectContext).some(
|
|
key => appStoreConnectContext[key].credentials.status === 'invalid'
|
|
)
|
|
: false;
|
|
|
|
return (
|
|
<SettingsNavigation
|
|
navigationObjects={getConfiguration({project, organization, debugFilesNeedsReview})}
|
|
access={new Set(organization.access)}
|
|
features={new Set(organization.features)}
|
|
organization={organization}
|
|
project={project}
|
|
/>
|
|
);
|
|
}
|
|
|
|
export default withProject(ProjectSettingsNavigation);
|