Skip to content

Commit d5cc50c

Browse files
committed
updated menu navigation to check the initial url
1 parent abcc187 commit d5cc50c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/layouts/Navigation.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ const DefaultIcon = ({ text }: { text: string }) => {
5555
.map((p) => {
5656
const gradientUrl = `url(#gradient-${p.name ?? p.title})`;
5757
return (
58-
<li class={`nav--list__item ${currentPath === p.path ? "active" : ""}`}>
58+
<li class={`nav--list__item ${currentPath.split("/")[1] === p.path.split("/")[1] ? "active" : ""}`}>
5959
<a href={p.path}>
6060
<span class="iconx">
6161
{p.icon ? (

0 commit comments

Comments
 (0)