Skip to content

Commit

Permalink
fix: homepage redirect
Browse files Browse the repository at this point in the history
  • Loading branch information
borcherd committed Aug 30, 2023
1 parent e30ff8d commit 71170ef
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/global/header/header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import * as utils from '@/utils'

import peanut_logo from '@/assets/peanutman-logo.svg'
import smiley from '@/assets/smiley.svg'
import { useRouter } from 'next/navigation'

export function Header({ showMarquee = true }: { showMarquee?: boolean }) {
const { address, isConnected } = useAccount()
Expand All @@ -22,7 +21,8 @@ export function Header({ showMarquee = true }: { showMarquee?: boolean }) {
<div
className="ml-1 flex h-full cursor-pointer items-center p-1 py-2 text-2xl font-bold uppercase text-white no-underline hover:bg-white hover:text-black"
onClick={() => {
window.location.reload()
if (window.location.pathname == '/') window.location.reload()
else window.location.href = '/'
}}
>
<img src={peanut_logo.src} alt="logo" className="h-6 sm:h-10" />
Expand Down

0 comments on commit 71170ef

Please sign in to comment.