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:
@@ -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 "{slug}" could not be found.</p>
|
||||
<p>Please check the URL or navigate using the sidebar.</p>
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -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(() => {
|
||||
|
||||
Reference in New Issue
Block a user