File tree Expand file tree Collapse file tree 1 file changed +14
-10
lines changed
Expand file tree Collapse file tree 1 file changed +14
-10
lines changed Original file line number Diff line number Diff line change @@ -72,19 +72,23 @@ function ErrorPage({
7272 possibleMatchesQuery ?: string
7373 heroProps : HeroSectionProps
7474} ) {
75- const resolvedHeroProps : HeroSectionProps = possibleMatches ?. length
76- ? {
77- ...heroProps ,
78- arrowUrl : '#possible-matches' ,
79- arrowLabel : 'Possible matches' ,
80- }
81- : articles ?. length
75+ // Only inject the "arrow down" helper link when the caller didn't provide an
76+ // explicit action. Otherwise, it can create duplicate CTAs (notably on 404s).
77+ const resolvedHeroProps : HeroSectionProps = heroProps . action
78+ ? heroProps
79+ : possibleMatches ?. length
8280 ? {
8381 ...heroProps ,
84- arrowUrl : '#articles ' ,
85- arrowLabel : 'But wait, there is more! ' ,
82+ arrowUrl : '#possible-matches ' ,
83+ arrowLabel : 'Possible matches ' ,
8684 }
87- : heroProps
85+ : articles ?. length
86+ ? {
87+ ...heroProps ,
88+ arrowUrl : '#articles' ,
89+ arrowLabel : 'But wait, there is more!' ,
90+ }
91+ : heroProps
8892 return (
8993 < >
9094 < noscript >
You can’t perform that action at this time.
0 commit comments