Skip to content

Commit

Permalink
Merge branch 'CGD-33-Navbar' of github.com:chingu-x/chingu-dashboard …
Browse files Browse the repository at this point in the history
…into CGD-33-Navbar
  • Loading branch information
Dan-Y-Ko committed Sep 7, 2023
2 parents e3ff820 + 4686ab8 commit c4e1054
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@
"object-curly-newline": [2, { "minProperties": 4, "consistent": true }],
"brace-style": 2,
"no-multiple-empty-lines": 2,
"eol-last": [2, "always"]
"eol-last": [2, "always"],
"no-nested-ternary": 2
}
}
6 changes: 5 additions & 1 deletion src/components/navbar/DropDown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,11 @@ export default function DropDown({ name }: { name: string }) {
<ul className="mx-4 p-2 bg-white left-2 font-medium z-10">
<li>
<DropDownLink handleClick={handleClick} title="Link 1" />
<DropDownLink handleClick={handleClick} title="404???" href="/hello404" />
<DropDownLink
handleClick={handleClick}
title="404???"
href="/hello404"
/>
</li>
</ul>
</details>
Expand Down
14 changes: 12 additions & 2 deletions src/components/navbar/DropDownLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,18 @@ interface DropDownLinkProps {
handleClick: () => void;
}

export default function DropDownLink({ title, href = "#", handleClick }: DropDownLinkProps) {
export default function DropDownLink({
title,
href = "#",
handleClick,
}: DropDownLinkProps) {
return (
<Link href={href} className="text-neutral hover:text-primary duration-200" onClick={handleClick}>{title}</Link>
<Link
href={href}
className="text-neutral hover:text-primary duration-200"
onClick={handleClick}
>
{title}
</Link>
);
}

0 comments on commit c4e1054

Please sign in to comment.