mirror of
https://github.com/langgenius/dify.git
synced 2026-07-26 14:18:35 +08:00
15 lines
381 B
TypeScript
15 lines
381 B
TypeScript
'use client'
|
|
|
|
import { useSyncExternalStore } from 'react'
|
|
import { getIsAmplitudeInitialized, subscribeAmplitudeInitialization } from './init'
|
|
|
|
const getServerAmplitudeInitialized = () => false
|
|
|
|
export function useAmplitudeInitialized() {
|
|
return useSyncExternalStore(
|
|
subscribeAmplitudeInitialization,
|
|
getIsAmplitudeInitialized,
|
|
getServerAmplitudeInitialized,
|
|
)
|
|
}
|