const firstElement = ref();
const secondElement = ref();
const handleAdding = () => {
.....
firstElement.value.scrollIntoView({ behavior: "smooth" });
};
const postEditing = (post: Post) => {
.....
secondElement.value.scrollIntoView({ behavior: "smooth" });
};