mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-05-25 23:58:15 +08:00

Co-authored-by: NFish <douxc512@gmail.com> Co-authored-by: zxhlyh <jasonapring2015@outlook.com> Co-authored-by: twwu <twwu@dify.ai> Co-authored-by: jZonG <jzongcode@gmail.com>
22 lines
472 B
TypeScript
22 lines
472 B
TypeScript
'use client'
|
|
|
|
import { useRef } from 'react'
|
|
import { useScrollIntersection } from './hooks'
|
|
|
|
type IntersectionLineProps = {
|
|
intersectionContainerId?: string
|
|
}
|
|
const IntersectionLine = ({
|
|
intersectionContainerId,
|
|
}: IntersectionLineProps) => {
|
|
const ref = useRef<HTMLDivElement>(null)
|
|
|
|
useScrollIntersection(ref, intersectionContainerId)
|
|
|
|
return (
|
|
<div ref={ref} className='mb-4 h-[1px] shrink-0 bg-transparent'></div>
|
|
)
|
|
}
|
|
|
|
export default IntersectionLine
|