|
@@ -15,7 +15,7 @@ import {URL_PARAM} from 'sentry/constants/pageFilters';
|
|
|
import {IconOpen} from 'sentry/icons';
|
|
|
import {t} from 'sentry/locale';
|
|
|
import {space} from 'sentry/styles/space';
|
|
|
-import type {Organization, Release} from 'sentry/types';
|
|
|
+import type {Organization, Project, Release} from 'sentry/types';
|
|
|
|
|
|
import MissingReleasesButtons from './missingFeatureButtons/missingReleasesButtons';
|
|
|
import {SectionHeadingLink, SectionHeadingWrapper, SidebarSection} from './styles';
|
|
@@ -28,7 +28,7 @@ type Props = DeprecatedAsyncComponent['props'] & {
|
|
|
location: Location;
|
|
|
organization: Organization;
|
|
|
projectSlug: string;
|
|
|
- projectId?: string;
|
|
|
+ project?: Project;
|
|
|
};
|
|
|
|
|
|
type State = {
|
|
@@ -85,13 +85,13 @@ class ProjectLatestReleases extends DeprecatedAsyncComponent<Props, State> {
|
|
|
*/
|
|
|
async onLoadAllEndpointsSuccess() {
|
|
|
const {releases} = this.state;
|
|
|
- const {organization, projectId, isProjectStabilized} = this.props;
|
|
|
+ const {organization, project, isProjectStabilized} = this.props;
|
|
|
|
|
|
if (!isProjectStabilized) {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- if ((releases ?? []).length !== 0 || !projectId) {
|
|
|
+ if ((releases ?? []).length !== 0 || !project?.id) {
|
|
|
this.setState({hasOlderReleases: true});
|
|
|
return;
|
|
|
}
|
|
@@ -101,7 +101,7 @@ class ProjectLatestReleases extends DeprecatedAsyncComponent<Props, State> {
|
|
|
const hasOlderReleases = await fetchAnyReleaseExistence(
|
|
|
this.api,
|
|
|
organization.slug,
|
|
|
- projectId
|
|
|
+ project.id
|
|
|
);
|
|
|
|
|
|
this.setState({hasOlderReleases, loading: false});
|
|
@@ -123,7 +123,7 @@ class ProjectLatestReleases extends DeprecatedAsyncComponent<Props, State> {
|
|
|
}
|
|
|
|
|
|
renderReleaseRow = (release: Release) => {
|
|
|
- const {projectId} = this.props;
|
|
|
+ const {project} = this.props;
|
|
|
const {lastDeploy, dateCreated} = release;
|
|
|
|
|
|
return (
|
|
@@ -133,7 +133,7 @@ class ProjectLatestReleases extends DeprecatedAsyncComponent<Props, State> {
|
|
|
<StyledVersion
|
|
|
version={release.version}
|
|
|
tooltipRawVersion
|
|
|
- projectId={projectId}
|
|
|
+ projectId={project?.id}
|
|
|
/>
|
|
|
</TextOverflow>
|
|
|
</Fragment>
|
|
@@ -141,7 +141,7 @@ class ProjectLatestReleases extends DeprecatedAsyncComponent<Props, State> {
|
|
|
};
|
|
|
|
|
|
renderInnerBody() {
|
|
|
- const {organization, projectId, isProjectStabilized} = this.props;
|
|
|
+ const {organization, project, isProjectStabilized} = this.props;
|
|
|
const {loading, releases, hasOlderReleases} = this.state;
|
|
|
const checkingForOlderReleases =
|
|
|
!(releases ?? []).length && hasOlderReleases === undefined;
|
|
@@ -153,7 +153,13 @@ class ProjectLatestReleases extends DeprecatedAsyncComponent<Props, State> {
|
|
|
}
|
|
|
|
|
|
if (!hasOlderReleases) {
|
|
|
- return <MissingReleasesButtons organization={organization} projectId={projectId} />;
|
|
|
+ return (
|
|
|
+ <MissingReleasesButtons
|
|
|
+ organization={organization}
|
|
|
+ projectId={project?.id}
|
|
|
+ platform={project?.platform}
|
|
|
+ />
|
|
|
+ );
|
|
|
}
|
|
|
|
|
|
if (!releases || releases.length === 0) {
|