Skip to content

Commit

Permalink
♻️ Conditionally handle dev of the week item in issue email generator
Browse files Browse the repository at this point in the history
  • Loading branch information
prateek3255 committed Aug 16, 2021
1 parent 079ef0c commit bf42217
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions scripts/issueEmailGenerator.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,27 @@ ${article.description}
___
${
currentIssue.devOfTheWeek
? `# Dev of the Week
<img alt="${currentIssue.devOfTheWeek.name}" src="${getAssetURL(
currentIssue.id,
currentIssue.devOfTheWeek.profileImg
)}" style="width:200px;"/>
## ${currentIssue.devOfTheWeek.name}
${currentIssue.devOfTheWeek.bio}
${Object.keys(currentIssue.devOfTheWeek)
.filter(key => PROFILE_KEYS.includes(key) && currentIssue.devOfTheWeek[key] !== null)
.map(profile => `[${PROFILE_TYPES[profile]}](${currentIssue.devOfTheWeek[profile]})`)
.join(' | ')}
___`
: ''
}
# Tools
${currentIssue.tools
Expand Down

0 comments on commit bf42217

Please sign in to comment.