diff options
| author | Md Saban <45597394+mdsaban@users.noreply.github.com> | 2024-06-23 17:39:40 +0530 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-06-23 13:09:40 +0100 |
| commit | a63713032ff6b15b80348f724246e7abea40c8a4 (patch) | |
| tree | 159801228f4702104feb827c3e78236253a79cff /apps/web/components/dashboard/settings/UserDetails.tsx | |
| parent | 1071095435ceb7030955bfdd9fc594e1a43c121b (diff) | |
| download | karakeep-a63713032ff6b15b80348f724246e7abea40c8a4.tar.zst | |
ui: Changes for user settings page (#251)
* fix: ui refactoring for user settings page
* fix: type error
* fix: pr comments
Diffstat (limited to 'apps/web/components/dashboard/settings/UserDetails.tsx')
| -rw-r--r-- | apps/web/components/dashboard/settings/UserDetails.tsx | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/apps/web/components/dashboard/settings/UserDetails.tsx b/apps/web/components/dashboard/settings/UserDetails.tsx new file mode 100644 index 00000000..3915782b --- /dev/null +++ b/apps/web/components/dashboard/settings/UserDetails.tsx @@ -0,0 +1,33 @@ +import { Input } from "@/components/ui/input"; +import { api } from "@/server/api/client"; + +export default async function UserDetails() { + const whoami = await api.users.whoami(); + + const details = [ + { + label: "Name", + value: whoami.name ?? undefined, + }, + { + label: "Email", + value: whoami.email ?? undefined, + }, + ]; + + return ( + <div className="mb-8 flex flex-col sm:flex-row"> + <div className="mb-4 w-full text-lg font-medium sm:w-1/3"> + Basic Details + </div> + <div className="w-full"> + {details.map(({ label, value }) => ( + <div className="mb-2" key={label}> + <div className="mb-2 text-sm font-medium">{label}</div> + <Input value={value} disabled /> + </div> + ))} + </div> + </div> + ); +} |
