chore(dev): show session role, convexUserId and Convex URL in sidebar footer to debug empty data in local dev
This commit is contained in:
parent
4f03433afe
commit
7b768735ea
1 changed files with 33 additions and 9 deletions
|
|
@ -214,6 +214,30 @@ export function AppSidebar({ ...props }: React.ComponentProps<typeof Sidebar>) {
|
|||
}}
|
||||
/>
|
||||
)}
|
||||
{process.env.NODE_ENV !== "production" ? (
|
||||
<div className="mt-3 rounded-lg border border-dashed border-slate-300 bg-slate-50 p-2 text-[11px] text-slate-700">
|
||||
<div className="flex items-center justify-between">
|
||||
<span className="font-semibold">Dev</span>
|
||||
<span className="rounded-full border border-slate-300 bg-white px-2 py-[2px]">{isStaff ? "staff" : "guest"}</span>
|
||||
</div>
|
||||
<div className="mt-1 grid gap-[2px]">
|
||||
<div>
|
||||
<span className="text-slate-500">role: </span>
|
||||
<span className="font-mono">{(session?.user as any)?.role ?? "(none)"}</span>
|
||||
</div>
|
||||
<div className="truncate">
|
||||
<span className="text-slate-500">convexUserId: </span>
|
||||
<span className="font-mono">{convexUserId ?? "(null)"}</span>
|
||||
</div>
|
||||
{process.env.NEXT_PUBLIC_CONVEX_URL ? (
|
||||
<div className="truncate">
|
||||
<span className="text-slate-500">convex: </span>
|
||||
<span className="font-mono">{process.env.NEXT_PUBLIC_CONVEX_URL}</span>
|
||||
</div>
|
||||
) : null}
|
||||
</div>
|
||||
</div>
|
||||
) : null}
|
||||
</SidebarFooter>
|
||||
<SidebarRail />
|
||||
</Sidebar>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue