diff --git a/packages/web/components/MainTabsOrPages/ViewConvo.tsx b/packages/web/components/MainTabsOrPages/ViewConvo.tsx index 1df380a..260626c 100644 --- a/packages/web/components/MainTabsOrPages/ViewConvo.tsx +++ b/packages/web/components/MainTabsOrPages/ViewConvo.tsx @@ -85,10 +85,6 @@ export default function ViewConvo(props: { conversationId: string }) { const router = useRouter(); - useEffect(() => { - endOfTimeline.current?.scrollIntoView({ behavior: "smooth" }); - }, []); - // auth if do not have this conversation in react cache, then we are not authorized // if somehow it's still cached but we were removed, // then authenticate by checking if we are in the array of users for the conversation @@ -105,6 +101,10 @@ export default function ViewConvo(props: { conversationId: string }) { const setSelectedConvoId = useSetRecoilState(selectedConvoAtom); + useEffect(() => { + endOfTimeline.current?.scrollIntoView({ behavior: "smooth" }); + }, [audioClips]); + useEffect(() => { // should have this convo, otherwise unauthorized if (!convo || !convo.activeMembers.includes(currUser!.uid)) { @@ -173,7 +173,7 @@ export default function ViewConvo(props: { conversationId: string }) { return ( <>