fix: prevent profile page from crashing for null profile values 🔨
This commit is contained in:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user