mirror of
https://github.com/kremalicious/portfolio.git
synced 2024-11-15 01:25:25 +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
|
||||
with:
|
||||
path: ~/.npm
|
||||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
||||
restore-keys: ${{ runner.os }}-node-
|
||||
key: ${{ runner.os }}-node-${{ matrix.node-version }}-${{ hashFiles('**/package-lock.json') }}
|
||||
restore-keys: ${{ runner.os }}-node-${{ matrix.node-version }}-
|
||||
|
||||
- name: Cache Gatsby build output
|
||||
uses: actions/cache@v1
|
||||
|
@ -40,21 +40,25 @@ function normalizeData(workPlace, eduPlace, award) {
|
||||
? eduPlace.studyType
|
||||
: 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 }) {
|
||||
const { title, subTitle, text, startDate, endDate, date } = normalizeData(
|
||||
const { title, subTitle, text, startDate, endDate } = normalizeData(
|
||||
workPlace,
|
||||
eduPlace,
|
||||
award
|
||||
)
|
||||
|
||||
const dateStart = date
|
||||
? new Date(date).getFullYear()
|
||||
: new Date(startDate).getFullYear()
|
||||
const dateStart = new Date(startDate).getFullYear()
|
||||
const dateEnd = endDate && new Date(endDate).getFullYear()
|
||||
const isSameYear = dateStart === dateEnd
|
||||
|
||||
@ -62,11 +66,7 @@ export default function ResumeItem({ workPlace, eduPlace, award }) {
|
||||
<div className={styles.resumeItem}>
|
||||
<span className={styles.time}>
|
||||
{dateStart}
|
||||
{dateEnd
|
||||
? !isSameYear && `–${dateEnd}`
|
||||
: !date
|
||||
? '–present'
|
||||
: null}{' '}
|
||||
{dateEnd ? !isSameYear && `–${dateEnd}` : '–present'}{' '}
|
||||
</span>
|
||||
<h4 className={styles.title}>{title}</h4>
|
||||
<h5 className={styles.subTitle}>{subTitle}</h5>
|
||||
|
Loading…
Reference in New Issue
Block a user