fix(docs): Update documentation error messages and enhance search dependencies

- Changed the error message in DocsContentClient to use HTML entities for quotes.
- Updated the dependency array in DocsSearch to include docsNavigation for improved memoization.
This commit is contained in:
Ho Ngoc Hai
2026-01-08 15:17:25 +07:00
parent 07e97449f2
commit 489adbd314
3 changed files with 73 additions and 28 deletions

View File

@@ -18,7 +18,7 @@ const LoadingDocs = () => (
const DocNotFound = ({ slug }: { slug: string }) => (
<div style={{ padding: '2rem', textAlign: 'center' }}>
<h2>Documentation Not Found</h2>
<p>The requested documentation "{slug}" could not be found.</p>
<p>The requested documentation &quot;{slug}&quot; could not be found.</p>
<p>Please check the URL or navigate using the sidebar.</p>
</div>
);

View File

@@ -42,7 +42,7 @@ export default function DocsSearch({ placeholder, locale = 'en', docsNavigation
category: group.label[currentLocale],
href: `/${currentLocale}/docs/${item.slug}`
}))
), [currentLocale]);
), [currentLocale, docsNavigation]);
// Calculate search results using useMemo instead of useEffect
const results = useMemo(() => {