|
@@ -4,6 +4,7 @@
|
|
|
* Playfair Display headings, Source Sans 3 body, forest green + terracotta + cream palette
|
|
* Playfair Display headings, Source Sans 3 body, forest green + terracotta + cream palette
|
|
|
*/
|
|
*/
|
|
|
import { useRef } from "react";
|
|
import { useRef } from "react";
|
|
|
|
|
+import { useAuth } from "@/_core/hooks/useAuth";
|
|
|
import { motion, useInView } from "framer-motion";
|
|
import { motion, useInView } from "framer-motion";
|
|
|
import {
|
|
import {
|
|
|
MessageCircle,
|
|
MessageCircle,
|
|
@@ -178,9 +179,10 @@ function Nav() {
|
|
|
{ label: "Architecture", href: "#architecture" },
|
|
{ label: "Architecture", href: "#architecture" },
|
|
|
{ label: "Integration", href: "#integration" },
|
|
{ label: "Integration", href: "#integration" },
|
|
|
{ label: "Benefits", href: "#benefits" },
|
|
{ label: "Benefits", href: "#benefits" },
|
|
|
-
|
|
|
|
|
];
|
|
];
|
|
|
|
|
|
|
|
|
|
+ const { user, isAuthenticated, loading } = useAuth();
|
|
|
|
|
+
|
|
|
return (
|
|
return (
|
|
|
<nav
|
|
<nav
|
|
|
className="fixed top-0 left-0 right-0 z-40 backdrop-blur-md border-b"
|
|
className="fixed top-0 left-0 right-0 z-40 backdrop-blur-md border-b"
|
|
@@ -221,19 +223,43 @@ function Nav() {
|
|
|
</a>
|
|
</a>
|
|
|
))}
|
|
))}
|
|
|
<div className="w-px h-5 mx-1" style={{ background: "#e7e0d5" }} />
|
|
<div className="w-px h-5 mx-1" style={{ background: "#e7e0d5" }} />
|
|
|
- <a
|
|
|
|
|
- href={`${import.meta.env.BASE_URL}login`}
|
|
|
|
|
- className="px-3 py-2 rounded-lg text-sm font-semibold transition-colors"
|
|
|
|
|
- style={{
|
|
|
|
|
- background: "#14532D",
|
|
|
|
|
- color: "#fff",
|
|
|
|
|
- fontFamily: "'Source Sans 3', sans-serif",
|
|
|
|
|
- borderRadius: "8px",
|
|
|
|
|
- padding: "6px 16px",
|
|
|
|
|
- }}
|
|
|
|
|
- >
|
|
|
|
|
- Sign In
|
|
|
|
|
- </a>
|
|
|
|
|
|
|
+ {!loading && isAuthenticated ? (
|
|
|
|
|
+ <div className="flex items-center gap-2">
|
|
|
|
|
+ <span
|
|
|
|
|
+ className="text-sm"
|
|
|
|
|
+ style={{ color: "#57534e", fontFamily: "'Source Sans 3', sans-serif" }}
|
|
|
|
|
+ >
|
|
|
|
|
+ {user?.name || user?.email}
|
|
|
|
|
+ </span>
|
|
|
|
|
+ <a
|
|
|
|
|
+ href={`${import.meta.env.BASE_URL}dashboard`}
|
|
|
|
|
+ className="px-3 py-2 rounded-lg text-sm font-semibold transition-colors"
|
|
|
|
|
+ style={{
|
|
|
|
|
+ background: "#14532D",
|
|
|
|
|
+ color: "#fff",
|
|
|
|
|
+ fontFamily: "'Source Sans 3', sans-serif",
|
|
|
|
|
+ borderRadius: "8px",
|
|
|
|
|
+ padding: "6px 16px",
|
|
|
|
|
+ }}
|
|
|
|
|
+ >
|
|
|
|
|
+ Dashboard
|
|
|
|
|
+ </a>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ ) : (
|
|
|
|
|
+ <a
|
|
|
|
|
+ href={`${import.meta.env.BASE_URL}login`}
|
|
|
|
|
+ className="px-3 py-2 rounded-lg text-sm font-semibold transition-colors"
|
|
|
|
|
+ style={{
|
|
|
|
|
+ background: "#14532D",
|
|
|
|
|
+ color: "#fff",
|
|
|
|
|
+ fontFamily: "'Source Sans 3', sans-serif",
|
|
|
|
|
+ borderRadius: "8px",
|
|
|
|
|
+ padding: "6px 16px",
|
|
|
|
|
+ }}
|
|
|
|
|
+ >
|
|
|
|
|
+ Sign In
|
|
|
|
|
+ </a>
|
|
|
|
|
+ )}
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</nav>
|
|
</nav>
|