Skip to content

Commit

Permalink
Merge branch 'main' into feat/updates-orama-to-0025
Browse files Browse the repository at this point in the history
  • Loading branch information
tannerlinsley authored Sep 23, 2024
2 parents 5cb7be4 + 92c0f73 commit 0c38ac6
Showing 1 changed file with 21 additions and 12 deletions.
33 changes: 21 additions & 12 deletions app/components/DocsLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,12 @@ export function DocsLayout({

const [showBytes, setShowBytes] = useLocalStorage('showBytes', true)

const [mounted, setMounted] = React.useState(false)

React.useEffect(() => {
setMounted(true)
}, [])

const menuItems = menuConfig.map((group, i) => {
const WrapperComp = group.collapsible ? 'details' : 'div'
const LabelComp = group.collapsible ? 'summary' : 'div'
Expand Down Expand Up @@ -538,18 +544,20 @@ export function DocsLayout({
className={`min-h-screen flex flex-col lg:flex-row w-full transition-all duration-300`}
>
<div className="fixed z-50">
<OramaSearchBox
{...searchBoxParams}
searchParams={{
threshold: 0,
where: {
category: {
eq: capitalize(libraryId!) as string,
},
} as any,
}}
facetProperty={undefined}
/>
{mounted && (
<OramaSearchBox
{...searchBoxParams}
searchParams={{
threshold: 0,
where: {
category: {
eq: capitalize(libraryId!) as string,
},
} as any,
}}
facetProperty={undefined}
/>
)}
</div>
{smallMenu}
{largeMenu}
Expand Down Expand Up @@ -632,6 +640,7 @@ export function DocsLayout({
href={partner.href}
target="_blank"
className="px-4 flex items-center justify-center cursor-pointer"
rel="noreferrer"
>
<div className="mx-auto max-w-[150px]">
<img
Expand Down

0 comments on commit 0c38ac6

Please sign in to comment.