From 478ec0e0f3a4c0efb2f024c40a5b1c4ba9503faf Mon Sep 17 00:00:00 2001 From: AJ-505 Date: Sat, 25 Oct 2025 11:18:00 +0100 Subject: [PATCH 1/7] Feat: Add role badge to dashboard --- src/app/dashboard/_components/sidebar.tsx | 11 ++++++++++- src/app/dashboard/settings/page.tsx | 21 +++++++++++++++++++++ 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/src/app/dashboard/_components/sidebar.tsx b/src/app/dashboard/_components/sidebar.tsx index 4eb5739..544ddf2 100644 --- a/src/app/dashboard/_components/sidebar.tsx +++ b/src/app/dashboard/_components/sidebar.tsx @@ -3,6 +3,7 @@ import Link from "next/link"; import { usePathname } from "next/navigation"; import { Home, Activity, BookOpen, MessageSquare, Phone, Settings } from "lucide-react"; import { useState } from "react"; +import { api } from "@/trpc/react"; type Item = { href: string; @@ -22,9 +23,17 @@ const items: Item[] = [ export function Sidebar() { const pathname = usePathname(); const [open, setOpen] = useState(false); + const { data: role } = api.signal.getViewerRole.useQuery(); + const isTutor = role === "TUTOR"; + const Nav = (