This is an automated email from the ASF dual-hosted git repository.

shuai pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/answer.git


The following commit(s) were added to refs/heads/main by this push:
     new 1611f85a fix: delete unused code
1611f85a is described below

commit 1611f85a960f85521ea6b38ee1623472e211070f
Author: shuai <[email protected]>
AuthorDate: Tue Mar 18 14:39:12 2025 +0800

    fix: delete unused code
---
 ui/src/pages/Questions/Detail/index.tsx | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/ui/src/pages/Questions/Detail/index.tsx 
b/ui/src/pages/Questions/Detail/index.tsx
index 95ae5234..6e81b42a 100644
--- a/ui/src/pages/Questions/Detail/index.tsx
+++ b/ui/src/pages/Questions/Detail/index.tsx
@@ -265,13 +265,11 @@ const Index = () => {
         });
       });
 
-      // 检查当前URL是否包含锚点,如果有,自动滚动到正确位置
       if (window.location.hash) {
         const { hash } = window.location;
         const targetElement = document.getElementById(hash.substring(1));
 
         if (targetElement) {
-          // 给浏览器一点时间来完成渲染
           setTimeout(() => {
             scrollToElementTop(targetElement);
           }, 100);
@@ -291,7 +289,6 @@ const Index = () => {
       attributeFilter: ['id', 'href'],
     });
 
-    // 监听 URL hash 变化
     const handleHashChange = () => {
       if (window.location.hash) {
         const { hash } = window.location;

Reply via email to