fix(docs-infra): only claim a search on the 404 page when results exist

The "Page Not Found" page always rendered the sentence "We have
initiated a search for the term extracted from the URL", but the
NotFound component only runs a search when a term can be extracted,
and only renders results when there is at least one hit. On a 404
with no extractable term or no matching results, the page asserted
a search it never backed up.

Gate the sentence behind the same searchResults() check that guards
the results list, so the empty state simply reads "We couldn't find
what you were looking for."
This commit is contained in:
Kam
2026-07-18 21:57:49 +03:00
committed by Pawel Kozlowski
parent b8a0fa00c9
commit 79fe1c3a05
@@ -4,8 +4,10 @@
<div class="docs-not-found__bubble">
<h1 tabindex="-1">Page Not Found</h1>
<p>
We couldn't find what you were looking for. We have initiated a search for the term
extracted from the URL.
We couldn't find what you were looking for.
@if (searchResults().length > 0) {
We have initiated a search for the term extracted from the URL.
}
</p>
<p>
If you think this is a mistake, please