Fix frontend tests (#6585)

Fix a few broken tests
This commit is contained in:
Félix Malfait
2024-08-09 08:38:01 +02:00
committed by GitHub
parent ab12d9e8da
commit f2cc385710
17 changed files with 86 additions and 347 deletions

View File

@ -1,13 +1,6 @@
import { DocSearch } from '@docsearch/react';
import { StoredDocSearchHit } from '@docsearch/react/dist/esm/types';
import { env } from 'next-runtime-env';
interface AlgoliaHit extends StoredDocSearchHit {
_snippetResult?: {
content: { value: string };
};
}
interface AlgoliaDocSearchProps {
pathname: string;
}
@ -18,7 +11,7 @@ export const AlgoliaDocSearch = ({ pathname }: AlgoliaDocSearchProps) => {
: 'developer';
return (
<DocSearch
hitComponent={({ hit }: { hit: AlgoliaHit }) => (
hitComponent={({ hit }: { hit: any }) => (
<section className="DocSearch-Hits">
<a href={hit.url}>
<div className="DocSearch-Hit-Container">