DashboardPreviewBanner: isNewPr prop adjustment (#109885)
Bug fix where when saving changes to dashboard, DashboardPreviewBanner is rendering backward banner between loaded from new resource vs new resource created on remote.
This commit is contained in:
@@ -45,13 +45,13 @@ function DashboardPreviewBannerContent({ queryParams, slug, path }: DashboardPre
|
|||||||
|
|
||||||
// This page was loaded with a `pull_request_url` in the URL
|
// This page was loaded with a `pull_request_url` in the URL
|
||||||
if (prURL?.length) {
|
if (prURL?.length) {
|
||||||
return <PreviewBannerViewPR prParam={prURL} />;
|
return <PreviewBannerViewPR prParam={prURL} isNewPr />;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check if this is a repo link
|
// Check if this is a repo link
|
||||||
const repoUrl = file.data?.urls?.newPullRequestURL ?? file.data?.urls?.compareURL;
|
const repoUrl = file.data?.urls?.newPullRequestURL ?? file.data?.urls?.compareURL;
|
||||||
if (repoUrl) {
|
if (repoUrl) {
|
||||||
return <PreviewBannerViewPR prParam={repoUrl} isNewPr />;
|
return <PreviewBannerViewPR prParam={repoUrl} />;
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
Reference in New Issue
Block a user