|
|
@@ -231,19 +231,21 @@ function Nav() {
|
|
|
>
|
|
|
{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>
|
|
|
+ {(user?.role === "admin" || user?.role === "agent") && (
|
|
|
+ <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
|