diff --git a/src/web/src/components/header.jsx b/src/web/src/components/header.jsx
index 07ded97..b1985e6 100644
--- a/src/web/src/components/header.jsx
+++ b/src/web/src/components/header.jsx
@@ -2,7 +2,7 @@
import ThemeToggle from "@/components/theme-toggle"
import Link from "next/link";
-import { motion } from "framer-motion";
+import { motion, AnimatePresence } from "framer-motion";
import { useState, useEffect } from "react";
@@ -30,46 +30,54 @@ function Header() {
setMounted(true);
}, []);
- if (!mounted) {
- return (
-
- {tabs.map((tab) => (
-
- {/* Placeholder for each tab */}
-
- ))}
-
- );
- }
-
return (
-
- {tabs.map((tab) => (
-
- setActiveTab(tab.id)}
- className={`${
- activeTab === tab.id ? "" : "hover:text-white/60"
- } relative rounded-full px-3 py-1.5 text-sm text-light-foreground dark:text-dark-foreground transition-all focus-visible:outline-2`}
- style={{
- WebkitTapHighlightColor: "transparent",
- }}
- >
- {activeTab === tab.id && (
-
- )}
- {tab.label}
-
-
- ))}
-
-
+
+ {mounted && (
+
+ {tabs.map((tab, index) => (
+
+ setActiveTab(tab.id)}
+ className={`${
+ activeTab === tab.id ? "" : ""
+ } relative rounded-full px-3 py-1.5 text-sm text-light-foreground dark:text-dark-foreground transition-all focus-visible:outline-2`}
+ style={{
+ WebkitTapHighlightColor: "transparent",
+ }}
+ variants={{
+ visible: { opacity: 1, x: 0 },
+ hidden: { opacity: 0, x: -50 }
+ }}
+ transition={{ duration: 0.3 }}
+ >
+ {activeTab === tab.id && (
+
+ )}
+ {tab.label}
+
+
+ ))}
+
+ )}
+
);
}