@bbki.ng/site 2.0.41 → 2.0.43

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # @bbki.ng/site
2
2
 
3
+ ## 2.0.43
4
+
5
+ ## 2.0.42
6
+
3
7
  ## 2.0.41
4
8
 
5
9
  ## 2.0.40
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bbki.ng/site",
3
- "version": "2.0.41",
3
+ "version": "2.0.43",
4
4
  "description": "code behind bbki.ng",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -34,7 +34,6 @@ export const MdxArticleList = [
34
34
  立秋,
35
35
  照片,
36
36
  小乌鸦,
37
- 我要看雪,
38
37
  做饭,
39
38
  堂兄,
40
39
  红色的枪,
@@ -28,7 +28,12 @@ export function useBlogScroll() {
28
28
 
29
29
  const gotoTop = useCallback(() => {
30
30
  if (!element) return;
31
- element.scrollTop = 0;
31
+
32
+ const id = setTimeout(() => {
33
+ element.scrollTo({ top: 0, behavior: "smooth" });
34
+ }, 150);
35
+
36
+ return () => clearTimeout(id);
32
37
  }, [element]);
33
38
 
34
39
  return {