Found the bug
This commit is contained in:
@@ -7,7 +7,7 @@ interface Props {
|
||||
setContextWordLine: React.Dispatch<React.SetStateAction<number | undefined>>
|
||||
}
|
||||
|
||||
const TextComponent: React.FC<Props> = ({part, contextWord, setContextWordLine}) => {
|
||||
const TextComponent: React.FC<Props> = ({ part, contextWord, setContextWordLine }) => {
|
||||
const textRef = useRef<HTMLDivElement>(null);
|
||||
|
||||
const calculateLineNumbers = () => {
|
||||
@@ -130,14 +130,11 @@ const TextComponent: React.FC<Props> = ({part, contextWord, setContextWordLine})
|
||||
}*/
|
||||
|
||||
return (
|
||||
<div className="flex flex-col gap-2 w-full">
|
||||
<div className="border border-mti-gray-dim w-full rounded-full opacity-10" />
|
||||
<div className="flex mt-2">
|
||||
<div ref={textRef} className="h-fit ml-2 flex flex-col gap-4">
|
||||
{part.context!.split('\n\n').map((line, index) => {
|
||||
return <p key={`line-${index}`}><span className="mr-6">{index + 1}</span>{line}</p>
|
||||
})}
|
||||
</div>
|
||||
<div className="flex mt-2">
|
||||
<div ref={textRef} className="h-fit ml-2 flex flex-col gap-4">
|
||||
{part.context!.split('\n\n').map((line, index) => {
|
||||
return <p key={`line-${index}`}><span className="mr-6">{index + 1}</span>{line}</p>
|
||||
})}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user