diff --git a/src/components/Chat/ChatContent/Message/Message.tsx b/src/components/Chat/ChatContent/Message/Message.tsx index b075b6c..f7cdc5d 100644 --- a/src/components/Chat/ChatContent/Message/Message.tsx +++ b/src/components/Chat/ChatContent/Message/Message.tsx @@ -1,4 +1,5 @@ import React from 'react'; +import useStore from '@store/store'; import Avatar from './Avatar'; import MessageContent from './MessageContent'; @@ -24,10 +25,14 @@ const Message = ({ messageIndex: number; sticky?: boolean; }) => { + const stickyIndex = useStore((state) => state.messages.length); + return (