Skip to content

Commit

Permalink
feat: add new link to documentation (#40)
Browse files Browse the repository at this point in the history
* fix: project components now sends only the components information from the right project.

* feat: add new link to documentation
  • Loading branch information
lopesdasilva authored Mar 15, 2024
1 parent 6982148 commit be733b8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,11 @@ export async function MainNav({
Components
</NavLink>
<NavLink
href="/api-doc"
rel="noreferrer noopener"
target="_blank"
href="https://diconium.github.io/ethereal-nexus/"
>
API Documentation
Documentation
</NavLink>
{session?.user?.role === 'admin' ? (
<NavLink
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,18 @@ function isSelected(pathname: string, href: string | UrlObject) {
return href !== '/' && pathname.startsWith(href.toString());
}

export function NavLink({href, className, children}: NavLinkProps) {
export function NavLink({href, className, children, target, rel}: NavLinkProps) {
const pathname = usePathname()
const selected = isSelected(pathname, href);

return (
<Link
href={href}
target={target}
rel={rel}
className={link({ selected, className })}
>
{children}
</Link>
);
}
}

0 comments on commit be733b8

Please sign in to comment.