Skip to content

Commit

Permalink
utilize Link enum
Browse files Browse the repository at this point in the history
  • Loading branch information
firehawk89 committed Feb 13, 2024
1 parent 298ed1e commit 1a56305
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
7 changes: 4 additions & 3 deletions src/components/header/header-navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import MenuItem from '@/components/header/menu/menu-item'
import Socials from '@/components/ui/socials'
import useMediaQuery from '@/hooks/use-media-query'
import HeaderContext from '@/store/header-context'
import { LINK } from '@/types/enums/Link'
import { MOBILE_BREAKPOINT, cn } from '@/utils'
import { FC, HTMLAttributes, useContext } from 'react'

Expand All @@ -27,9 +28,9 @@ const HeaderNavbar: FC<HeaderNavbarProps> = ({ className, ...props }) => {
className="mx-auto uppercase"
orientation={isMobile ? 'vertical' : 'horizontal'}
>
<MenuItem href="/#about-me">About Me</MenuItem>
<MenuItem href="/#my-projects">My Projects</MenuItem>
<MenuItem href="/#contact-me">Contact Me</MenuItem>
<MenuItem href={LINK.about}>About Me</MenuItem>
<MenuItem href={LINK.projects}>My Projects</MenuItem>
<MenuItem href={LINK.contact}>Contact Me</MenuItem>
</Menu>
<Socials className="mt-6 justify-center md:hidden" />
</nav>
Expand Down
3 changes: 2 additions & 1 deletion src/components/sections/hero/hero.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { buttonVariants } from '@/components/ui/button'
import Content from '@/components/ui/content'
import Heading from '@/components/ui/heading'
import Socials from '@/components/ui/socials'
import { LINK } from '@/types/enums/Link'
import { cn } from '@/utils'
import Image from 'next/image'
import Link from 'next/link'
Expand Down Expand Up @@ -40,7 +41,7 @@ const Hero: FC<HeroProps> = ({ className, ...props }) => {
</article>
<Link
className={cn('mt-5', buttonVariants({ variant: 'outline' }))}
href="/#my-projects"
href={LINK.projects}
>
My Projects
</Link>
Expand Down
3 changes: 2 additions & 1 deletion src/components/ui/logo.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
'use client'

import HeaderContext from '@/store/header-context'
import { LINK } from '@/types/enums/Link'
import { cn } from '@/utils'
import Link from 'next/link'
import { AnchorHTMLAttributes, FC, useContext } from 'react'
Expand All @@ -13,7 +14,7 @@ const Logo: FC<LogoProps> = ({ className, ...props }) => {
return (
<Link
className={cn('text-3xl font-bold text-accent', className)}
href="/"
href={LINK.index}
onClick={closeMenu}
{...props}
>
Expand Down

0 comments on commit 1a56305

Please sign in to comment.