Skip to content

Commit 406bb6d

Browse files
committed
tidy up contact office variables
1 parent 24691db commit 406bb6d

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

source/views/sis/student-work/detail.android.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,9 @@ function Contact({job}: {job: JobType}) {
6363
const contactName = job.contactName
6464
const contactEmail = job.contactEmail
6565
const contactNumber = job.contactPhone
66+
const contactOffice = job.office
6667

67-
return job.office || contactName ? (
68+
return contactName || contactEmail || contactNumber || contactOffice ? (
6869
<Card header="Contact" style={styles.card}>
6970
<Text style={styles.cardBody}>{contactName}</Text>
7071

@@ -90,7 +91,9 @@ function Contact({job}: {job: JobType}) {
9091
</Text>
9192
) : null}
9293

93-
{job.office ? <Text style={styles.cardBody}>{job.office}</Text> : null}
94+
{contactOffice ? (
95+
<Text style={styles.cardBody}>{contactOffice}</Text>
96+
) : null}
9497
</Card>
9598
) : null
9699
}

0 commit comments

Comments
 (0)