Skip to content

Commit

Permalink
Added more FadeIn delay options (for ExperienceCards)
Browse files Browse the repository at this point in the history
  • Loading branch information
raphaeling committed Oct 27, 2023
1 parent 750287c commit 5d08d14
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 15 deletions.
28 changes: 15 additions & 13 deletions src/app/(pages)/experience/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import PageHeading from '@/components/root/PageHeading';
import PageBody from '@/components/root/PageBody';
import ExperienceCard from '@/components/experience/ExperienceCard';
import experienceItems from '@/content/experienceItems';
import FadeIn from '@/components/root/FadeIn';

export default function Experience(): JSX.Element {
return (
Expand All @@ -12,23 +13,24 @@ export default function Experience(): JSX.Element {
</h2>
</PageHeading>
<PageBody className=''>
{experienceItems.map((exp) => {
{experienceItems.map((exp, index) => {
return (
<>
<ExperienceCard
workplace={exp.workplace}
title={exp.title}
startDate={exp.startDate}
endDate={exp.endDate}
description={exp.description}
skills={exp.skills}
/>
</>
<div key={index}>
<FadeIn order={index+2}>
<ExperienceCard
workplace={exp.workplace}
title={exp.title}
startDate={exp.startDate}
endDate={exp.endDate}
description={exp.description}
skills={exp.skills}
/>
</FadeIn>
</div>
);
})}
{/* <ExperienceCard />
<ExperienceCard /> */}
</PageBody>
</div>
);
}

6 changes: 4 additions & 2 deletions src/components/root/FadeIn.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,13 @@ export default function FadeIn({
case 2:
delay = 'delay-200';
break;
case 3:
delay = 'delay-300';
case -1:
delay = 'delay-400';
delay = 'delay-500';
break;
default:
delay = 'delay-300';
delay = 'delay-400';
}

useEffect(() => {
Expand Down

0 comments on commit 5d08d14

Please sign in to comment.