-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
fix(preprod): Settings button redirect #107488
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -136,7 +136,7 @@ export function BuildDetailsHeaderContent(props: BuildDetailsHeaderContentProps) | |
| platform: buildDetailsData.app_info?.platform ?? null, | ||
| build_id: buildDetailsData.id, | ||
| project_type: projectType, | ||
| project_slug: projectId, | ||
| project_slug: project?.slug, | ||
| }); | ||
| router.push( | ||
| getCompareBuildPath({ | ||
|
|
@@ -153,7 +153,7 @@ export function BuildDetailsHeaderContent(props: BuildDetailsHeaderContentProps) | |
| organization, | ||
| platform: buildDetailsData.app_info?.platform ?? null, | ||
| build_id: buildDetailsData.id, | ||
| project_slug: projectId, | ||
| project_slug: project?.slug, | ||
| project_type: projectType, | ||
| }); | ||
| }; | ||
|
|
@@ -198,12 +198,14 @@ export function BuildDetailsHeaderContent(props: BuildDetailsHeaderContentProps) | |
| {t('Compare Build')} | ||
| </Button> | ||
| <Feature features="organizations:preprod-frontend-routes"> | ||
| <LinkButton | ||
| size="sm" | ||
| icon={<IconSettings />} | ||
| aria-label={t('Settings')} | ||
| to={`/settings/${organization.slug}/projects/${projectId}/mobile-builds/`} | ||
| /> | ||
| {project && ( | ||
| <LinkButton | ||
| size="sm" | ||
| icon={<IconSettings />} | ||
| aria-label={t('Settings')} | ||
| to={`/settings/${organization.slug}/projects/${project?.slug}/mobile-builds/`} | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| /> | ||
| )} | ||
| </Feature> | ||
| <ConfirmDelete | ||
| message={t( | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,6 +8,7 @@ import {PreprodBuildsTable} from 'sentry/components/preprod/preprodBuildsTable'; | |
| import SentryDocumentTitle from 'sentry/components/sentryDocumentTitle'; | ||
| import {IconSettings} from 'sentry/icons'; | ||
| import {t} from 'sentry/locale'; | ||
| import ProjectsStore from 'sentry/stores/projectsStore'; | ||
| import getApiUrl from 'sentry/utils/api/getApiUrl'; | ||
| import {useApiQuery, type UseApiQueryResult} from 'sentry/utils/queryClient'; | ||
| import {decodeList, decodeScalar} from 'sentry/utils/queryString'; | ||
|
|
@@ -28,6 +29,8 @@ export default function BuildList() { | |
| }); | ||
| const projects = Array.from(new Set(projectList.filter(Boolean))); | ||
| const projectId = projects[0]; | ||
| const singleProject = | ||
| projectId === undefined ? undefined : ProjectsStore.getById(projectId); | ||
sentry[bot] marked this conversation as resolved.
Show resolved
Hide resolved
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Bug: The code uses Suggested FixReplace the call to Prompt for AI Agent |
||
|
|
||
| const queryParams: Record<string, any> = { | ||
| per_page: 25, | ||
|
|
@@ -77,13 +80,13 @@ export default function BuildList() { | |
| <Layout.Header> | ||
| <Layout.Title>Builds</Layout.Title> | ||
| <Layout.HeaderActions> | ||
| {projects.length === 1 && ( | ||
| {singleProject && ( | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Settings button appears when multiple projects selectedMedium Severity The condition controlling when the Settings button appears changed from Additional Locations (1) |
||
| <Feature features="organizations:preprod-frontend-routes"> | ||
| <LinkButton | ||
| size="sm" | ||
| icon={<IconSettings />} | ||
| aria-label={t('Settings')} | ||
| to={`/settings/${organization.slug}/projects/${projectId}/mobile-builds/`} | ||
| to={`/settings/${organization.slug}/projects/${singleProject.slug}/mobile-builds/`} | ||
| /> | ||
| </Feature> | ||
| )} | ||
|
|
||


Uh oh!
There was an error while loading. Please reload this page.