@@ -29,7 +49,18 @@ const ListingImageFlipper = (props: Props) => {
);
}
- const currentArtifact = artifacts[currentImageIndex];
+ const handleNavigate = (direction: "next" | "prev") => {
+ const nextIndex =
+ direction === "next"
+ ? (currentImageArrayIndex + 1) % imageArtifacts.length
+ : currentImageArrayIndex === 0
+ ? imageArtifacts.length - 1
+ : currentImageArrayIndex - 1;
+
+ setCurrentImageIndex(imageArtifacts[nextIndex].originalIndex);
+ };
+
+ const currentArtifact = imageArtifacts[currentImageArrayIndex].artifact;
return (
<>
@@ -41,24 +72,16 @@ const ListingImageFlipper = (props: Props) => {
className="cursor-zoom-in rounded-lg w-[500px]"
/>
{/* Navigation arrows */}
- {artifacts.length > 1 && (
+ {imageArtifacts.length > 1 && (
<>
@@ -87,9 +103,15 @@ const Navbar = () => {
key={item.name}
asChild
variant={
- location.pathname === item.path ? "default" : "outline"
+ location.pathname.startsWith(item.path)
+ ? "ghost"
+ : "outline"
}
- className="px-2 xl:px-3 py-2 text-sm tracking-widest"
+ className={`px-2 xl:px-3 py-2 text-sm tracking-widest ${
+ location.pathname.startsWith(item.path)
+ ? "underline underline-offset-4 decoration-2"
+ : ""
+ }`}
>
{item.name}
@@ -103,15 +125,31 @@ const Navbar = () => {
<>
@@ -120,15 +158,31 @@ const Navbar = () => {
<>
diff --git a/frontend/src/components/nav/Sidebar.tsx b/frontend/src/components/nav/Sidebar.tsx
index 739b9262..80ef79e4 100644
--- a/frontend/src/components/nav/Sidebar.tsx
+++ b/frontend/src/components/nav/Sidebar.tsx
@@ -28,7 +28,7 @@ const SidebarItem = ({