@@ -24,7 +24,7 @@ function PageBody() {
2424 } )
2525
2626 if ( ! data ) {
27- return < > </ >
27+ return < > No identity found </ >
2828 }
2929
3030 return (
@@ -36,14 +36,18 @@ function PageBody() {
3636 < span className = "text-xs text-muted-foreground uppercase tracking-wide font-medium" > Name</ span >
3737 < span className = "font-semibold text-base" > { data . name } </ span >
3838 </ div >
39- < div className = "flex flex-col gap-1" >
40- < span className = "text-xs text-muted-foreground uppercase tracking-wide font-medium" > Email</ span >
41- < span className = "font-mono text-sm text-muted-foreground" > { data . email } </ span >
42- </ div >
43- < div className = "flex flex-col gap-1" >
44- < span className = "text-xs text-muted-foreground uppercase tracking-wide font-medium" > Date of Birth</ span >
45- < span className = "text-sm" > { data . date_of_birth } </ span >
46- </ div >
39+ { data . email && (
40+ < div className = "flex flex-col gap-1" >
41+ < span className = "text-xs text-muted-foreground uppercase tracking-wide font-medium" > Email</ span >
42+ < span className = "font-mono text-sm text-muted-foreground" > { data . email } </ span >
43+ </ div >
44+ ) }
45+ { data . date_of_birth && (
46+ < div className = "flex flex-col gap-1" >
47+ < span className = "text-xs text-muted-foreground uppercase tracking-wide font-medium" > Date of Birth</ span >
48+ < span className = "text-sm" > { data . date_of_birth } </ span >
49+ </ div >
50+ ) }
4751 </ div >
4852 </ div >
4953
@@ -71,19 +75,21 @@ function PageBody() {
7175 </ div >
7276 </ div >
7377
74- < div className = "bg-card text-card-foreground rounded-lg border p-6" >
75- < h3 className = "text-lg font-semibold mb-4" > Address</ h3 >
76- < div className = "flex flex-col gap-1" >
77- < div className = "text-sm leading-relaxed" >
78- < div className = "font-medium" > { data . postal_address . address } </ div >
79- < div className = "text-muted-foreground" >
80- { data . postal_address . city }
81- { data . postal_address . zip && `, ${ data . postal_address . zip } ` }
78+ { data . postal_address && (
79+ < div className = "bg-card text-card-foreground rounded-lg border p-6" >
80+ < h3 className = "text-lg font-semibold mb-4" > Address</ h3 >
81+ < div className = "flex flex-col gap-1" >
82+ < div className = "text-sm leading-relaxed" >
83+ < div className = "font-medium" > { data . postal_address . address } </ div >
84+ < div className = "text-muted-foreground" >
85+ { data . postal_address . city }
86+ { data . postal_address . zip && `, ${ data . postal_address . zip } ` }
87+ </ div >
88+ < div className = "text-muted-foreground" > { data . postal_address . country } </ div >
8289 </ div >
83- < div className = "text-muted-foreground" > { data . postal_address . country } </ div >
8490 </ div >
8591 </ div >
86- </ div >
92+ ) }
8793 </ div >
8894 )
8995}
0 commit comments