fixing errors
This commit is contained in:
parent
2b3378f5df
commit
1410bef852
|
@ -209,11 +209,15 @@ export function ContractPageContent(
|
|||
const [answerResponse, setAnswerResponse] = useState<Answer | undefined>(
|
||||
undefined
|
||||
)
|
||||
const answerRef = useRef<null | HTMLDivElement>(null)
|
||||
const onAnswerCommentClick = useEvent((answer: Answer) => {
|
||||
setAnswerResponse(answer)
|
||||
answerRef.current.scrollIntoView({ behavior: 'smooth' })
|
||||
if (answerRef.current) {
|
||||
answerRef.current.scrollIntoView({ behavior: 'smooth' })
|
||||
} else {
|
||||
console.error('no ref to scroll to')
|
||||
}
|
||||
})
|
||||
const answerRef = useRef(null)
|
||||
const onCancelAnswerResponse = useEvent(() => setAnswerResponse(undefined))
|
||||
|
||||
return (
|
||||
|
|
Loading…
Reference in New Issue
Block a user