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:
Yunwen Zheng
2025-08-20 13:01:45 -04:00
committed by GitHub
parent 4adbab1571
commit 6085bbf820
@@ -45,13 +45,13 @@ function DashboardPreviewBannerContent({ queryParams, slug, path }: DashboardPre
// This page was loaded with a `pull_request_url` in the URL
if (prURL?.length) {
return <PreviewBannerViewPR prParam={prURL} />;
return <PreviewBannerViewPR prParam={prURL} isNewPr />;
}
// Check if this is a repo link
const repoUrl = file.data?.urls?.newPullRequestURL ?? file.data?.urls?.compareURL;
if (repoUrl) {
return <PreviewBannerViewPR prParam={repoUrl} isNewPr />;
return <PreviewBannerViewPR prParam={repoUrl} />;
}
return (