diff --git a/web/components/feed/feed-answer-comment-group.tsx b/web/components/feed/feed-answer-comment-group.tsx
index 2665880e..a184dd3c 100644
--- a/web/components/feed/feed-answer-comment-group.tsx
+++ b/web/components/feed/feed-answer-comment-group.tsx
@@ -68,7 +68,7 @@ export function FeedAnswerCommentGroup(props: {
if (router.asPath.endsWith(`#${answerElementId}`)) {
setHighlighted(true)
}
- }, [router.asPath])
+ }, [answerElementId, router.asPath])
return (
diff --git a/web/components/feed/feed-comments.tsx b/web/components/feed/feed-comments.tsx
index 198647c6..1d443ccf 100644
--- a/web/components/feed/feed-comments.tsx
+++ b/web/components/feed/feed-comments.tsx
@@ -132,7 +132,7 @@ export function FeedComment(props: {
if (router.asPath.endsWith(`#${comment.id}`)) {
setHighlighted(true)
}
- }, [router.asPath])
+ }, [comment.id, router.asPath])
// Only calculated if they don't have a matching bet
const { userPosition, outcome } = getBettorsLargestPositionBeforeTime(
@@ -287,7 +287,7 @@ export function CommentInput(props: {
useEffect(() => {
if (!replyToUsername || !user || replyToUsername === user.username) return
const replacement = `@${replyToUsername} `
- setComment(replacement + comment.replace(replacement, ''))
+ setComment((comment) => replacement + comment.replace(replacement, ''))
}, [user, replyToUsername])
async function submitComment(betId: string | undefined) {