Skip to content

Commit

Permalink
Feat: Make transitions faster when switching pages via menu clicks #61
Browse files Browse the repository at this point in the history
  • Loading branch information
rmdnps10 committed Oct 11, 2024
1 parent b92eb1b commit c24c211
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/app/component/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,18 @@ export default function Header() {
const pathname = usePathname()
const isShowHeader = useScrollDirection()
const { isShowMobileMenu, showMobileMenu, hideMobileMenu } = useMobileMenu()
const { isLoading, loadingProgress, startLoading } =
const { isLoading, loadingProgress, startLoading, setLoadingSpeed } =
useLoadingProgress(pathname)

const handleMobileLinkClick = () => {
hideMobileMenu()
startLoading()
setLoadingSpeed(5)
}

const handleLinkClick = () => {
startLoading()
setLoadingSpeed(5)
}

const getLinkClass = (path: string) => {
Expand Down

0 comments on commit c24c211

Please sign in to comment.