aboutsummaryrefslogtreecommitdiff
path: root/174bg/manager/src/components/Welcome.jsx
diff options
context:
space:
mode:
Diffstat (limited to '174bg/manager/src/components/Welcome.jsx')
-rw-r--r--174bg/manager/src/components/Welcome.jsx14
1 files changed, 14 insertions, 0 deletions
diff --git a/174bg/manager/src/components/Welcome.jsx b/174bg/manager/src/components/Welcome.jsx
new file mode 100644
index 0000000..da771cf
--- /dev/null
+++ b/174bg/manager/src/components/Welcome.jsx
@@ -0,0 +1,14 @@
+export default function Welcome({ record }) {
+ const name = record?.RSI_Handle || record?.name || "Pilot";
+ const avatarFile = record?.avatar;
+ const avatarUrl = avatarFile
+ ? `https://db.174bg.net/api/files/${record.collectionId}/${record.id}/${avatarFile}`
+ : null;
+
+ return (
+ <div id="welcome">
+ {avatarUrl && <img id="welcome-avatar" src={avatarUrl} alt={name} />}
+ <span id="welcome-text">Welcome back, {name}!</span>
+ </div>
+ );
+}