Skip to content

Commit 65bf112

Browse files
committed
refactor: improve readability of heading rendering logic in jobDescriptorSection
1 parent 91069e7 commit 65bf112

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

src/components/Tiles/RecordTile.tsx

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,20 @@ function jobDescriptorSection(
5151
return (
5252
<div className="flex flex-col justify-between sm:flex-row md:items-start">
5353
<div>
54-
{isOrganizationBeforeRole ? organizationNameHeading : roleHeading}
55-
{!isOrganizationBeforeRole ? organizationNameHeading : roleHeading}
54+
<>
55+
{isOrganizationBeforeRole && (
56+
<>
57+
{organizationNameHeading}
58+
{roleHeading}
59+
</>
60+
)}
61+
{!isOrganizationBeforeRole && (
62+
<>
63+
{roleHeading}
64+
{organizationNameHeading}
65+
</>
66+
)}
67+
</>
5668
{!isWidth768pxOrMore && (
5769
<h3 className="font-typewriter text-gray-600 dark:text-gray-400">{duration}</h3>
5870
)}

0 commit comments

Comments
 (0)