Includes=>endsWith for multi digit answers
This commit is contained in:
parent
ef98c16c26
commit
d458d8a299
|
@ -61,7 +61,7 @@ export function FeedAnswerCommentGroup(props: {
|
|||
const [highlighted, setHighlighted] = useState(false)
|
||||
const router = useRouter()
|
||||
useEffect(() => {
|
||||
if (router.asPath.includes(`#${answerElementId}`)) {
|
||||
if (router.asPath.endsWith(`#${answerElementId}`)) {
|
||||
setHighlighted(true)
|
||||
}
|
||||
}, [router.asPath])
|
||||
|
|
|
@ -213,7 +213,7 @@ export function FeedComment(props: {
|
|||
const [highlighted, setHighlighted] = useState(false)
|
||||
const router = useRouter()
|
||||
useEffect(() => {
|
||||
if (router.asPath.includes(`#${comment.id}`)) {
|
||||
if (router.asPath.endsWith(`#${comment.id}`)) {
|
||||
setHighlighted(true)
|
||||
}
|
||||
}, [router.asPath])
|
||||
|
|
Loading…
Reference in New Issue
Block a user