Skip to content

Commit d059961

Browse files
committed
refactor: change scrollDown to arrow function for consistency
1 parent eae58ca commit d059961

File tree

1 file changed

+2
-2
lines changed
  • packages/app/src/app/pages/Sandbox/Editor/Workspace/Chat

1 file changed

+2
-2
lines changed

packages/app/src/app/pages/Sandbox/Editor/Workspace/Chat/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ export const Chat: React.FC = () => {
2727
const [height, setHeight] = useState('');
2828
const { state, actions } = useOvermind();
2929
const messagesRef = useRef(null);
30-
function scrollDown() {
30+
const scrollDown = () => {
3131
if (messagesRef.current) {
3232
messagesRef.current.scrollTop = messagesRef.current.scrollHeight;
3333
}
34-
}
34+
};
3535
useEffect(scrollDown);
3636

3737
const handleKeyDown = (e: KeyboardEvent) => {

0 commit comments

Comments
 (0)