mirror of
https://github.com/i701/sarlink-portal.git
synced 2025-12-04 04:03:21 +00:00
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
All checks were successful
Build and Push Docker Images / Build and Push Docker Images (push) Successful in 11m11s
This commit is contained in:
@@ -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",
|
||||||
|
|||||||
Reference in New Issue
Block a user