A Q&A platform software for teams at any scales. Whether it's a community forum, help center, or knowledge management platform, you can always count on Apache Answer.
fix: delete unused code
shuai1611f85a960f
diff --git a/ui/src/pages/Questions/Detail/index.tsx b/ui/src/pages/Questions/Detail/index.tsxindex 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;