Merge pull request #258 from answerdev/feat/1.0.7/ui

fix: set scorll postion for tag detail
This commit is contained in:
dashuai 2023-03-15 14:55:19 +08:00 committed by GitHub
commit f33f14a2e3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 2 deletions

View File

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

View File

@ -111,9 +111,9 @@ const Tags = () => {
<Card.Body className="d-flex flex-column align-items-start"> <Card.Body className="d-flex flex-column align-items-start">
<Tag className="mb-3" data={tag} /> <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)} {htmlToReact(tag.parsed_text)}
</p> </div>
<div className="d-flex align-items-center"> <div className="d-flex align-items-center">
<Button <Button
className={`me-2 ${tag.is_follower ? 'active' : ''}`} className={`me-2 ${tag.is_follower ? 'active' : ''}`}