Skip to content

Commit

Permalink
Wraps affiliations in divs for spacing
Browse files Browse the repository at this point in the history
  • Loading branch information
codycooperross committed Feb 6, 2023
1 parent 6be6e84 commit 95c02d8
Showing 1 changed file with 21 additions and 15 deletions.
36 changes: 21 additions & 15 deletions src/components/WorkPerson/WorkPerson.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,16 @@ const WorkPerson: React.FunctionComponent<Props> = ({ person }) => {
</h4>
{person.affiliation.length > 0 && (
<>
<div className="affiliation">
<div className="affiliations">
{person.affiliation.map((item) =>
item.id ? (
<Link key={item.id} href={'/ror.org' + rorFromUrl(item.id)}>
<a>{item.name}</a>
</Link>
<div className="affiliation" key={item.id}>
<Link href={'/ror.org' + rorFromUrl(item.id)}>
<a>{item.name}</a>
</Link>
</div>
) : (
<div key={item.name}>{item.name}</div>
<div className="affiliation" key={item.name}>{item.name}</div>
)
)}
</div>
Expand All @@ -69,14 +71,16 @@ const WorkPerson: React.FunctionComponent<Props> = ({ person }) => {
</h4>
{person.affiliation.length > 0 && (
<>
<div className="affiliation">
<div className="affiliations">
{person.affiliation.map((item) =>
item.id ? (
<Link key={item.id} href={'/ror.org' + rorFromUrl(item.id)}>
<a>{item.name}</a>
</Link>
<div className="affiliation" key={item.id}>
<Link href={'/ror.org' + rorFromUrl(item.id)}>
<a>{item.name}</a>
</Link>
</div>
) : (
<div key={item.name}>{item.name}</div>
<div className="affiliation" key={item.name}>{item.name}</div>
)
)}
</div>
Expand All @@ -95,14 +99,16 @@ const WorkPerson: React.FunctionComponent<Props> = ({ person }) => {
<h4 className="work">{name}</h4>
{person.affiliation.length > 0 && (
<>
<div className="affiliation">
<div className="affiliations">
{person.affiliation.map((item) =>
item.id ? (
<Link key={item.id} href={'/ror.org' + rorFromUrl(item.id)}>
<a>{item.name}</a>
</Link>
<div className="affiliation" key={item.id}>
<Link href={'/ror.org' + rorFromUrl(item.id)}>
<a>{item.name}</a>
</Link>
</div>
) : (
<div key={item.name}>{item.name}</div>
<div className="affiliation" key={item.name}>{item.name}</div>
)
)}
</div>
Expand Down

0 comments on commit 95c02d8

Please sign in to comment.