Skip to content

Commit

Permalink
fix: link index
Browse files Browse the repository at this point in the history
  • Loading branch information
aulianza committed Oct 14, 2023
1 parent b7553d0 commit 982f031
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/modules/homepage/components/LinkItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ import { clsx } from "clsx";
import { LinkProps } from "@/common/types/link";

interface LinkItemProps extends LinkProps {
key: number;
index: number;
onClick: (href: string, target: string) => void;
}

const LinkItem = ({
key,
index,
label,
icon,
href,
Expand All @@ -24,7 +24,7 @@ const LinkItem = ({
className="relative inline-flex items-center justify-start py-4 pl-4 pr-14 overflow-hidden font-medium text-neutral-800 transition-all duration-150 ease-in-out rounded-lg hover:pl-12 hover:pr-6 bg-white group border shadow-sm"
data-aos="fade-down"
data-aos-duration="1000"
data-aos-delay={key * 100}
data-aos-delay={index * 100}
>
<span
className={clsx(
Expand Down
2 changes: 1 addition & 1 deletion src/modules/homepage/components/Links.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const Links = () => {
</div>
<div className="flex flex-col w-full gap-y-3">
{LINKS?.map((item, index) => (
<LinkItem key={index} onClick={handleClick} {...item} />
<LinkItem key={index} index={index} onClick={handleClick} {...item} />
))}
</div>

Expand Down

0 comments on commit 982f031

Please sign in to comment.