mirror of
https://github.com/kremalicious/portfolio.git
synced 2025-02-14 21:10:41 +01:00
workflow cache fixes
This commit is contained in:
parent
d680dd5545
commit
46e05e2501
4
.github/workflows/test.yml
vendored
4
.github/workflows/test.yml
vendored
@ -22,8 +22,8 @@ jobs:
|
|||||||
uses: actions/cache@v1
|
uses: actions/cache@v1
|
||||||
with:
|
with:
|
||||||
path: ~/.npm
|
path: ~/.npm
|
||||||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
key: ${{ runner.os }}-node-${{ matrix.node-version }}-${{ hashFiles('**/package-lock.json') }}
|
||||||
restore-keys: ${{ runner.os }}-node-
|
restore-keys: ${{ runner.os }}-node-${{ matrix.node-version }}-
|
||||||
|
|
||||||
- name: Cache Gatsby build output
|
- name: Cache Gatsby build output
|
||||||
uses: actions/cache@v1
|
uses: actions/cache@v1
|
||||||
|
@ -40,21 +40,25 @@ function normalizeData(workPlace, eduPlace, award) {
|
|||||||
? eduPlace.studyType
|
? eduPlace.studyType
|
||||||
: null
|
: null
|
||||||
|
|
||||||
const { startDate, endDate, date } = workPlace || eduPlace || award
|
const startDate = award
|
||||||
|
? award.date
|
||||||
|
: (workPlace && workPlace.startDate) || (eduPlace && eduPlace.startDate)
|
||||||
|
|
||||||
return { title, subTitle, text, startDate, endDate, date }
|
const endDate = award
|
||||||
|
? null
|
||||||
|
: (workPlace && workPlace.endDate) || (eduPlace && eduPlace.endDate)
|
||||||
|
|
||||||
|
return { title, subTitle, text, startDate, endDate }
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function ResumeItem({ workPlace, eduPlace, award }) {
|
export default function ResumeItem({ workPlace, eduPlace, award }) {
|
||||||
const { title, subTitle, text, startDate, endDate, date } = normalizeData(
|
const { title, subTitle, text, startDate, endDate } = normalizeData(
|
||||||
workPlace,
|
workPlace,
|
||||||
eduPlace,
|
eduPlace,
|
||||||
award
|
award
|
||||||
)
|
)
|
||||||
|
|
||||||
const dateStart = date
|
const dateStart = new Date(startDate).getFullYear()
|
||||||
? new Date(date).getFullYear()
|
|
||||||
: new Date(startDate).getFullYear()
|
|
||||||
const dateEnd = endDate && new Date(endDate).getFullYear()
|
const dateEnd = endDate && new Date(endDate).getFullYear()
|
||||||
const isSameYear = dateStart === dateEnd
|
const isSameYear = dateStart === dateEnd
|
||||||
|
|
||||||
@ -62,11 +66,7 @@ export default function ResumeItem({ workPlace, eduPlace, award }) {
|
|||||||
<div className={styles.resumeItem}>
|
<div className={styles.resumeItem}>
|
||||||
<span className={styles.time}>
|
<span className={styles.time}>
|
||||||
{dateStart}
|
{dateStart}
|
||||||
{dateEnd
|
{dateEnd ? !isSameYear && `–${dateEnd}` : '–present'}{' '}
|
||||||
? !isSameYear && `–${dateEnd}`
|
|
||||||
: !date
|
|
||||||
? '–present'
|
|
||||||
: null}{' '}
|
|
||||||
</span>
|
</span>
|
||||||
<h4 className={styles.title}>{title}</h4>
|
<h4 className={styles.title}>{title}</h4>
|
||||||
<h5 className={styles.subTitle}>{subTitle}</h5>
|
<h5 className={styles.subTitle}>{subTitle}</h5>
|
||||||
|
Loading…
Reference in New Issue
Block a user