diff --git a/src/app/notes/error.tsx b/src/app/notes/error.tsx
index 1f635a0993..211a08f40c 100644
--- a/src/app/notes/error.tsx
+++ b/src/app/notes/error.tsx
@@ -1,5 +1,7 @@
'use client'
+import { Paper } from './Paper'
+
const isRequestError = (error: Error) => {
return error.message.startsWith(`Request failed with status code`)
}
@@ -25,16 +27,18 @@ export default ({ error, reset }: { error: Error; reset: () => void }) => {
)
}
return (
-
-
Something went wrong!
-
-
+
+
+
Something went wrong!
+
+
+
)
}
diff --git a/src/app/notes/layout.tsx b/src/app/notes/layout.tsx
index 880b1c2196..69ab4d5a7e 100644
--- a/src/app/notes/layout.tsx
+++ b/src/app/notes/layout.tsx
@@ -17,16 +17,7 @@ export default async (props: PropsWithChildren) => {
>
-
- {props.children}
-
+ {props.children}
diff --git a/src/app/notes/page.tsx b/src/app/notes/page.tsx
index 99983cd3f9..80b7382be4 100644
--- a/src/app/notes/page.tsx
+++ b/src/app/notes/page.tsx
@@ -8,6 +8,8 @@ import { Loading } from '~/components/ui/loading'
import { queries } from '~/queries/definition'
import { apiClient } from '~/utils/request'
+import { Paper } from './Paper'
+
export default () => {
const { data } = useQuery(
['note', 'latest'],
@@ -36,5 +38,9 @@ export default () => {
}
}, [data])
- return
+ return (
+
+
+
+ )
}
diff --git a/src/components/layout/header/config.ts b/src/components/layout/header/config.ts
index d31e4368bd..0df5e1b2d3 100644
--- a/src/components/layout/header/config.ts
+++ b/src/components/layout/header/config.ts
@@ -34,25 +34,21 @@ export const headerMenuConfig: IHeaderMenu[] = [
subMenu: [],
},
{
- title: '文',
+ title: '水文',
path: '/posts',
type: 'Post',
subMenu: [],
icon: h(IcTwotoneSignpost),
},
{
- title: '记',
+ title: '手记',
type: 'Note',
path: '/notes',
icon: h(FaSolidFeatherAlt),
},
+
{
- title: '言',
- path: '/says',
- icon: h(FaSolidComments),
- },
- {
- title: '览',
+ title: '速览',
icon: h(FaSolidHistory),
path: '/timeline',
subMenu: [
@@ -74,25 +70,30 @@ export const headerMenuConfig: IHeaderMenu[] = [
],
},
{
- title: '友',
+ title: '友链',
icon: h(FaSolidUserFriends),
path: '/friends',
},
{
- title: '诉',
+ title: '之言',
icon: h(FaSolidComment),
path: '/recently',
},
{
- title: '码',
+ title: '项目',
icon: h(MdiFlask),
path: '/projects',
},
{
- title: '趣',
+ title: '其他',
icon: h(FaSolidCircleNotch),
path: '/favorite/music',
subMenu: [
+ {
+ title: '一言',
+ path: '/says',
+ icon: h(FaSolidComments),
+ },
{
title: '听歌',
icon: h(RiNeteaseCloudMusicLine),
diff --git a/src/components/layout/header/internal/HeaderContent.tsx b/src/components/layout/header/internal/HeaderContent.tsx
index 7eef7f733e..51843d5c88 100644
--- a/src/components/layout/header/internal/HeaderContent.tsx
+++ b/src/components/layout/header/internal/HeaderContent.tsx
@@ -52,6 +52,7 @@ const ForDesktop: Component = ({ className }) => {
)
const { config: headerMenuConfig } = useHeaderConfig()
+ const pathname = usePathname()
return (
{
>
{headerMenuConfig.map((section) => {
- return
+ return (
+
+ )
})}
@@ -77,17 +87,18 @@ const ForDesktop: Component = ({ className }) => {
const HeaderMenuItem = memo<{
section: IHeaderMenu
-}>(({ section }) => {
- const pathname = usePathname()
+ isActive: boolean
+}>(({ section, isActive }) => {
const href = section.path
- const isActive = pathname === href || pathname.startsWith(`${href}/`)
+
return (
)
})
+HeaderMenuItem.displayName = 'HeaderMenuItem'
const MenuPopover: Component<{
subMenu: IHeaderMenu['subMenu']
@@ -143,6 +155,7 @@ const MenuPopover: Component<{
)
})
+MenuPopover.displayName = 'MenuPopover'
function AnimatedItem({
href,
diff --git a/src/components/ui/loading/index.tsx b/src/components/ui/loading/index.tsx
index 4462fb367b..a6026dc52e 100644
--- a/src/components/ui/loading/index.tsx
+++ b/src/components/ui/loading/index.tsx
@@ -1,6 +1,5 @@
import React from 'react'
-import { useIsClient } from '~/hooks/common/use-is-client'
import { clsxm } from '~/utils/helper'
export type LoadingProps = {
@@ -14,8 +13,6 @@ export const Loading: Component = ({
className,
useDefaultLoadingText = false,
}) => {
- const isClient = useIsClient()
- if (!isClient) return null
const nextLoadingText = useDefaultLoadingText
? defaultLoadingText
: loadingText
diff --git a/src/components/ui/markdown/renderers/paragraph.tsx b/src/components/ui/markdown/renderers/paragraph.tsx
index 0f3fe2c775..5c09ac860f 100644
--- a/src/components/ui/markdown/renderers/paragraph.tsx
+++ b/src/components/ui/markdown/renderers/paragraph.tsx
@@ -8,7 +8,7 @@ export const MParagraph: FC<
const { children, ...other } = props
const { className, ...rest } = other
return (
-
+
{children}
)
diff --git a/src/components/ui/transition/BottomToUpTransitionView.tsx b/src/components/ui/transition/BottomToUpTransitionView.tsx
index eecc098b92..c23e67a133 100644
--- a/src/components/ui/transition/BottomToUpTransitionView.tsx
+++ b/src/components/ui/transition/BottomToUpTransitionView.tsx
@@ -4,7 +4,7 @@ import { createTransitionView } from './factor'
export const BottomToUpTransitionView = createTransitionView({
from: {
- translateY: '3rem',
+ translateY: 50,
opacity: 0,
},
to: {
diff --git a/src/hooks/common/use-is-client.ts b/src/hooks/common/use-is-client.ts
index 6d2c465622..fc5066bb33 100644
--- a/src/hooks/common/use-is-client.ts
+++ b/src/hooks/common/use-is-client.ts
@@ -1,3 +1,5 @@
+'use client'
+
import { useEffect, useState } from 'react'
export const useIsClient = () => {