Skip to content

Commit

Permalink
fix: optimize
Browse files Browse the repository at this point in the history
Signed-off-by: Innei <[email protected]>
  • Loading branch information
Innei committed Jul 8, 2023
1 parent c323e03 commit 2c69af6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion src/components/layout/header/internal/HeaderContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { usePathname } from 'next/navigation'
import type { IHeaderMenu } from '../config'

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

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

const showShow = useScollIsUpAndPageIsOver(600) && hasMetaInfo
const showShow = useDebounceValue(
useScollIsUpAndPageIsOver(600) && hasMetaInfo,
120,
)
return (
<RootPortal>
<AnimatePresence>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export const HeaderDrawerButton = () => {

<Dialog.Content>
<m.dialog
className="fixed left-0 right-0 top-0 z-[12] block overflow-auto rounded-xl bg-base-100/90"
className="fixed left-0 right-0 top-0 z-[12] block overflow-auto rounded-xl bg-base-100/90 backdrop-blur-sm"
initial={{ opacity: 0.8 }}
animate={{ opacity: 1 }}
exit={{ opacity: 0 }}
Expand Down
2 changes: 1 addition & 1 deletion src/components/widgets/shared/ReadIndicator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export const ReadIndicatorForMobile: Component<{}> = () => {
)}
>
<div
className="absolute top-0 w-full bg-accent/80"
className="absolute top-0 w-full bg-accent/80 duration-75 ease-linear"
style={{
height: `${readPercent}%`,
}}
Expand Down

1 comment on commit 2c69af6

@vercel
Copy link

@vercel vercel bot commented on 2c69af6 Jul 8, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

shiro – ./

shiro-innei.vercel.app
shiro-git-main-innei.vercel.app
innei.in
springtide.vercel.app

Please sign in to comment.