aboutsummaryrefslogtreecommitdiff
path: root/jb-ui/src/components/UserAccount.tsx
blob: 5aef0315cf7787c1f02238af141c5c50b684c780 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import { useGetMeQuery } from "@/models/authAPI";

const UserAccount = () => {
  const { data: user } = useGetMeQuery();

  if (!user?.product_user_id) return null;

  return (
    <div
      className="fixed bottom-21 right-0 p-2
            bg-slate-700 text-zinc-200 z-50
            font-mono
            "
    >
      <div className="grid grid-cols-[auto_1fr] text-xs">
        <div className="label text-left pr-2">Email:</div>
        <div className="value text-left">{user.email} </div>
        <div className="label text-left pr-2">Name:</div>
        <div className="value text-left">{user.display_name ?? "___"}</div>{" "}
      </div>
    </div>
  );
};

export default UserAccount;