mirror of https://github.com/langgenius/dify.git
16 lines
387 B
TypeScript
16 lines
387 B
TypeScript
'use client'
|
|
|
|
import { useHydrateAtoms } from 'jotai/utils'
|
|
import { preserveSearchStateInQueryAtom } from './atoms'
|
|
|
|
export function HydrateMarketplaceAtoms({
|
|
preserveSearchStateInQuery,
|
|
children,
|
|
}: {
|
|
preserveSearchStateInQuery: boolean
|
|
children: React.ReactNode
|
|
}) {
|
|
useHydrateAtoms([[preserveSearchStateInQueryAtom, preserveSearchStateInQuery]])
|
|
return <>{children}</>
|
|
}
|