diff --git a/artifacts/toolrate/src/components/layout.tsx b/artifacts/toolrate/src/components/layout.tsx index 6e4904d..dfbdd83 100644 --- a/artifacts/toolrate/src/components/layout.tsx +++ b/artifacts/toolrate/src/components/layout.tsx @@ -6,7 +6,7 @@ import { Skeleton } from "@/components/ui/skeleton"; export function Layout({ children }: { children: React.ReactNode }) { const [location] = useLocation(); - const { user, isLoading, isAuthenticated, isAdmin, isLocalMode, login, logout } = useAuth(); + const { user, isLoading, isAuthenticated, isAdmin, isLocalMode, tier, login, logout } = useAuth(); const links = [ { href: "/", label: "Dashboard", icon: LayoutDashboard }, @@ -55,14 +55,15 @@ export function Layout({ children }: { children: React.ReactNode }) {
-
-

- {user.name || user.preferredUsername || "User"} -

- {user.email && ( -

{user.email}

- )} -
+
+

+ {user.name || user.preferredUsername || "User"} +

+
+ {tier} + {user.email && {user.email}} +
+
+ )} + + + {costsLoading ? ( + + ) : costs.length > 0 ? ( +
+ {costs.map((c, i) => ( + + +
+
+ {c.licenseType} +
+ {c.cost != null ? `${c.cost} ${c.currency ?? ""}` : "Free"} +
+ {c.renewalDate && ( +

+ Renews: {new Date(c.renewalDate).toLocaleDateString()} +

+ )} + {c.notes &&

{c.notes}

} +
+ {isAdmin && ( +
+ + +
+ )} +
+
+
+ ))} +
+ ) : ( +

No cost information added yet.

+ )} + + )} + + {/* Cost Dialog */} + { if (!o) setCostDialogOpen(false); }}> + + + {editCost ? "Edit Cost" : "Add Cost"} + Manage license cost information for this tool. + +
+
+ + +
+
+
+ + setCostAmount(e.target.value)} /> +
+
+ + +
+
+
+ + setCostRenewal(e.target.value)} /> +
+
+ +