fix: set scorll postion for tag detail

This commit is contained in:
shuai 2023-03-15 14:54:34 +08:00
parent 6de0482bbb
commit 29f6673e9d
2 changed files with 7 additions and 2 deletions

View File

@ -31,6 +31,11 @@ const Questions: FC = () => {
object_id: tagInfo.tag_id,
});
};
useEffect(() => {
window.scrollTo(0, 0);
}, [curTagName]);
useEffect(() => {
if (tagResp) {
const info = { ...tagResp };

View File

@ -111,9 +111,9 @@ const Tags = () => {
<Card.Body className="d-flex flex-column align-items-start">
<Tag className="mb-3" data={tag} />
<p className="fs-14 flex-fill text-break text-wrap text-truncate-3 reset-p">
<div className="fs-14 flex-fill text-break text-wrap text-truncate-3 reset-p mb-3">
{htmlToReact(tag.parsed_text)}
</p>
</div>
<div className="d-flex align-items-center">
<Button
className={`me-2 ${tag.is_follower ? 'active' : ''}`}