Merge pull request #520 from arifszn/handle-empty-section-item
Handle empty section item
This commit is contained in:
commit
0b7eed46b4
@ -78,15 +78,22 @@ const CertificationCard = ({
|
||||
renderSkeleton()
|
||||
) : (
|
||||
<>
|
||||
{certifications.map((certification, index) => (
|
||||
<ListItem
|
||||
key={index}
|
||||
year={`${certification.year}`}
|
||||
name={certification.name}
|
||||
body={certification.body}
|
||||
link={certification.link ? certification.link : undefined}
|
||||
/>
|
||||
))}
|
||||
{certifications
|
||||
.filter(
|
||||
(certification) =>
|
||||
certification.year ||
|
||||
certification.name ||
|
||||
certification.body,
|
||||
)
|
||||
.map((certification, index) => (
|
||||
<ListItem
|
||||
key={index}
|
||||
year={certification.year}
|
||||
name={certification.name}
|
||||
body={certification.body}
|
||||
link={certification.link}
|
||||
/>
|
||||
))}
|
||||
</>
|
||||
)}
|
||||
</ol>
|
||||
|
||||
@ -70,14 +70,19 @@ const EducationCard = ({
|
||||
renderSkeleton()
|
||||
) : (
|
||||
<>
|
||||
{educations.map((item, index) => (
|
||||
<ListItem
|
||||
key={index}
|
||||
time={`${item.from} - ${item.to}`}
|
||||
degree={item.degree}
|
||||
institution={item.institution}
|
||||
/>
|
||||
))}
|
||||
{educations
|
||||
.filter(
|
||||
(item) =>
|
||||
item.institution || item.degree || item.from || item.to,
|
||||
)
|
||||
.map((item, index) => (
|
||||
<ListItem
|
||||
key={index}
|
||||
time={`${item.from} - ${item.to}`}
|
||||
degree={item.degree}
|
||||
institution={item.institution}
|
||||
/>
|
||||
))}
|
||||
</>
|
||||
)}
|
||||
</ol>
|
||||
|
||||
@ -75,19 +75,27 @@ const ExperienceCard = ({
|
||||
renderSkeleton()
|
||||
) : (
|
||||
<Fragment>
|
||||
{experiences.map((experience, index) => (
|
||||
<ListItem
|
||||
key={index}
|
||||
time={`${experience.from} - ${experience.to}`}
|
||||
position={experience.position}
|
||||
company={experience.company}
|
||||
companyLink={
|
||||
experience.companyLink
|
||||
? experience.companyLink
|
||||
: undefined
|
||||
}
|
||||
/>
|
||||
))}
|
||||
{experiences
|
||||
.filter(
|
||||
(experience) =>
|
||||
experience.company ||
|
||||
experience.position ||
|
||||
experience.from ||
|
||||
experience.to,
|
||||
)
|
||||
.map((experience, index) => (
|
||||
<ListItem
|
||||
key={index}
|
||||
time={`${experience.from} - ${experience.to}`}
|
||||
position={experience.position}
|
||||
company={experience.company}
|
||||
companyLink={
|
||||
experience.companyLink
|
||||
? experience.companyLink
|
||||
: undefined
|
||||
}
|
||||
/>
|
||||
))}
|
||||
</Fragment>
|
||||
)}
|
||||
</ol>
|
||||
|
||||
@ -98,9 +98,9 @@ const GithubProjectCard = ({
|
||||
<div className="flex justify-between flex-col p-8 h-full w-full">
|
||||
<div>
|
||||
<div className="flex items-center">
|
||||
<div className="card-title text-lg tracking-wide flex text-base-content opacity-60">
|
||||
<div className="card-title text-lg tracking-wide flex text-base-content opacity-60 truncate">
|
||||
<MdInsertLink className="my-auto" />
|
||||
<span>{item.name}</span>
|
||||
<span className="truncate">{item.name}</span>
|
||||
</div>
|
||||
</div>
|
||||
<p className="mb-5 mt-1 text-base-content text-opacity-60 text-sm">
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user