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 <FloatingLabelInput
id="floating-island" id="floating-island"
label="Island" label="Island"
value={`${profile?.atoll.name}. ${profile?.island.name}`} value={`${profile?.atoll?.name}. ${profile?.island?.name}`}
readOnly readOnly
/> />
<FloatingLabelInput <FloatingLabelInput
id="floating-dob" id="floating-dob"
label="Date of Birth" label="Date of Birth"
value={`${new Date( value={`${new Date(
profile?.dob.toString() ?? "", profile?.dob?.toString() ?? "",
).toLocaleDateString("en-US", { ).toLocaleDateString("en-US", {
month: "short", month: "short",
day: "2-digit", day: "2-digit",