Skip to content

Commit

Permalink
Merge pull request #191 from timlrx/fix/algolia-types
Browse files Browse the repository at this point in the history
fix: remove dependency on algolia internal type
  • Loading branch information
timlrx authored Nov 2, 2024
2 parents 2c49747 + ef38b03 commit ba8604b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/olive-ladybugs-perform.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'pliny': minor
---

remove dependency on internal types
3 changes: 1 addition & 2 deletions packages/pliny/src/search/Algolia.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import type {
DocSearchProps,
DocSearchModalProps,
} from '@docsearch/react'
import type { InternalDocSearchHit, StoredDocSearchHit } from '@docsearch/react/dist/esm/types'

export type AlgoliaSearchProps = {
algoliaConfig: DocSearchProps
Expand Down Expand Up @@ -51,7 +50,7 @@ function Hit({
hit,
children,
}: {
hit: InternalDocSearchHit | StoredDocSearchHit
hit: Parameters<NonNullable<DocSearchProps['hitComponent']>>[0]['hit']
children: React.ReactNode
}) {
return <CustomLink href={hit.url}>{children}</CustomLink>
Expand Down

0 comments on commit ba8604b

Please sign in to comment.