fix: prevent profile page from crashing for null profile values 🔨
All checks were successful
Build and Push Docker Images / Build and Push Docker Images (push) Successful in 11m11s

This commit is contained in:
2025-09-24 20:04:04 +05:00
parent 9ad1887f88
commit f0cf2d5223

View File

@@ -41,14 +41,14 @@ export default async function Profile() {
<FloatingLabelInput
id="floating-island"
label="Island"
value={`${profile?.atoll.name}. ${profile?.island.name}`}
value={`${profile?.atoll?.name}. ${profile?.island?.name}`}
readOnly
/>
<FloatingLabelInput
id="floating-dob"
label="Date of Birth"
value={`${new Date(
profile?.dob.toString() ?? "",
profile?.dob?.toString() ?? "",
).toLocaleDateString("en-US", {
month: "short",
day: "2-digit",