Skip to content

Commit

Permalink
disable link if user is not part of a voyage
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan-Y-Ko committed Sep 21, 2023
1 parent 9c002c3 commit 20245a8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/sidebar/VoyagePageButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ export default function VoyagePageButton({

return (
<li className="h-7">
<Link href={element.link}>
<Link href={isVoyageStarted ? element.link : "#"} >
<Button
title={element.name}
customClassName={`bg-transparent hover:bg-transparent w-[9.375rem] h-[1.1875rem] min-h-0 mb-2.5 flex justify-start ${
isVoyageStarted ? "pl-11" : "pl-6"
isVoyageStarted ? "pl-11" : "pl-6 pointer-events-none"
} text-neutral-focus capitalize border-none relative`}
onMouseEnter={() => setHoveredButton(element.link)}
onMouseLeave={() => setHoveredButton(null)}
Expand Down

0 comments on commit 20245a8

Please sign in to comment.