Skip to content

Commit

Permalink
chore: change displayed info in Experience section of architect view.
Browse files Browse the repository at this point in the history
  • Loading branch information
dlv237 committed Jul 6, 2024
1 parent 5c2b0ec commit 9b905c3
Showing 1 changed file with 13 additions and 21 deletions.
34 changes: 13 additions & 21 deletions my-app/src/components/profile/experience.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export default function Experience({ architect, architectScales }: { architect:
<div className="profileDataContainerVertical">
<div className="scaleDataContainer">
<h2 className="profileDataType" style={{ marginBottom: "10px" }}>
Experiencia:
<li typeof="disc">Experiencia:</li>
</h2>
<h2 className="profileData">
{experienceDict.find((exp) => exp.id === architect.experience_id)?.name}
Expand All @@ -51,27 +51,19 @@ export default function Experience({ architect, architectScales }: { architect:
<div className="profileDataContainerVertical">
<div className="scaleDataContainer">
<h2 className="profileDataType" style={{ marginBottom: "10px" }}>
Escalas:
<li typeof="disc">Escalas:</li>
</h2>
<div className="profileData">
{architectScales.length <= 3 ? (
architectScales.map((scale: ScaleData) => (
<p key={scale.scale_id}>{scaleDict.find((scl) => scl.id === scale.scale_id)?.name}</p>
))
) : (
<>
<p>
{architectScales.slice(0, 3).map((scale: ScaleData) => (
<span key={scale.scale_id}>{scaleDict.find((scl) => scl.id === scale.scale_id)?.name} - </span>
))}
</p>
<p>
{architectScales.slice(3).map((scale: ScaleData) => (
<span key={scale.scale_id}>{scaleDict.find((scl) => scl.id === scale.scale_id)?.name} - </span>
))}
</p>
</>
)}
<div className="profileData">
<p>
{architectScales.slice(0, 3).map((scale: ScaleData) =>
scaleDict.find((scl) => scl.id === scale.scale_id)?.name
).join(' - ')}
</p>
<p>
{architectScales.slice(3).map((scale: ScaleData) =>
scaleDict.find((scl) => scl.id === scale.scale_id)?.name
).join(' - ')}
</p>
</div>
</div>
</div>
Expand Down

0 comments on commit 9b905c3

Please sign in to comment.