Skip to content

Commit 2c69af6

Browse files
committed
fix: optimize
Signed-off-by: Innei <[email protected]>
1 parent c323e03 commit 2c69af6

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

src/components/layout/header/internal/HeaderContent.tsx

+5-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import { usePathname } from 'next/navigation'
1313
import type { IHeaderMenu } from '../config'
1414

1515
import { RootPortal } from '~/components/ui/portal'
16+
import useDebounceValue from '~/hooks/common/use-debounce-value'
1617
import { clsxm } from '~/lib/helper'
1718
import { useScollIsUpAndPageIsOver } from '~/providers/root/page-scroll-info-provider'
1819

@@ -34,7 +35,10 @@ export const HeaderContent = () => {
3435
const AccessibleMenu: Component = () => {
3536
const hasMetaInfo = useHeaderHasMetaInfo()
3637

37-
const showShow = useScollIsUpAndPageIsOver(600) && hasMetaInfo
38+
const showShow = useDebounceValue(
39+
useScollIsUpAndPageIsOver(600) && hasMetaInfo,
40+
120,
41+
)
3842
return (
3943
<RootPortal>
4044
<AnimatePresence>

src/components/layout/header/internal/HeaderDrawerButton.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export const HeaderDrawerButton = () => {
3636

3737
<Dialog.Content>
3838
<m.dialog
39-
className="fixed left-0 right-0 top-0 z-[12] block overflow-auto rounded-xl bg-base-100/90"
39+
className="fixed left-0 right-0 top-0 z-[12] block overflow-auto rounded-xl bg-base-100/90 backdrop-blur-sm"
4040
initial={{ opacity: 0.8 }}
4141
animate={{ opacity: 1 }}
4242
exit={{ opacity: 0 }}

src/components/widgets/shared/ReadIndicator.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export const ReadIndicatorForMobile: Component<{}> = () => {
3939
)}
4040
>
4141
<div
42-
className="absolute top-0 w-full bg-accent/80"
42+
className="absolute top-0 w-full bg-accent/80 duration-75 ease-linear"
4343
style={{
4444
height: `${readPercent}%`,
4545
}}

0 commit comments

Comments
 (0)