Skip to content

Commit

Permalink
fix: rendering errors occur when displaying hit test results in full …
Browse files Browse the repository at this point in the history
…text search (langgenius#12191)
  • Loading branch information
fujita-h authored Dec 29, 2024
1 parent bd2fec4 commit 716bb85
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion web/app/components/datasets/hit-testing/components/score.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,17 @@ import React from 'react'
import cn from '@/utils/classnames'

type Props = {
value: number
value: number | null
besideChunkName?: boolean
}

const Score: FC<Props> = ({
value,
besideChunkName,
}) => {
if (!value)
return null

return (
<div className={cn('relative items-center px-[5px] border border-components-progress-bar-border overflow-hidden', besideChunkName ? 'border-l-0 h-[20.5px]' : 'h-[20px] rounded-md')}>
<div className={cn('absolute top-0 left-0 h-full bg-util-colors-blue-brand-blue-brand-100 border-r-[1.5px] border-components-progress-brand-progress', value === 1 && 'border-r-0')} style={{ width: `${value * 100}%` }} />
Expand Down

0 comments on commit 716bb85

Please sign in to comment.