Skip to content

Commit

Permalink
Changes to be committed:
Browse files Browse the repository at this point in the history
	modified:   client/src/components/layouts/NavActive.tsx
  • Loading branch information
Thith-thith committed Aug 7, 2023
1 parent 3ef563e commit c4c9d00
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions client/src/components/layouts/NavActive.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Component } from "solid-js";
import { useLocation } from "@solidjs/router";
import { useLocation, A } from "@solidjs/router";

export type Nav = {
title: string;
Expand All @@ -13,15 +13,16 @@ const NavActive: Component<Nav> = (props) => {
const localtion = useLocation();

return (
<a
<A
href={link}
class={`${
localtion.pathname === link && "text-primary font-extrabold"
} text-gray-900 flex cursor-pointer items-center gap-x-2 rounded-md py-2 px-4 hover:opacity-80`}
end={true}
>
{isIcon && icon}
<span class="font-medium">{title}</span>
</a>
</A>
);
};

Expand Down

0 comments on commit c4c9d00

Please sign in to comment.