Skip to content

Commit

Permalink
fix: add singular case to feed message 🔠 (#484)
Browse files Browse the repository at this point in the history
  • Loading branch information
gpolite0 authored Aug 29, 2024
1 parent b91595b commit f80a185
Showing 1 changed file with 18 additions and 3 deletions.
21 changes: 18 additions & 3 deletions packages/core/src/modules/feed/feed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,13 @@ async function getCompanyReviewsMessage(): Promise<string | null> {
})
.join('\n');

const title =
items.length === 1
? 'Check out this company review posted yesterday! 💼'
: 'Check out these company reviews posted yesterday! 💼';

return dedent`
Check out these company reviews posted yesterday 📝:
${title}
${items}
`;
}
Expand All @@ -131,8 +136,13 @@ async function getMembersMessage(): Promise<string | null> {

url.searchParams.set('joinedDirectoryDate', yesterday.format('YYYY-MM-DD'));

const title =
members.length === 1
? `Say hello to the <${url}|${members.length} member> who joined the Member Directory yesterday! 👋`
: `Say hello to the <${url}|${members.length} members> who joined the Member Directory yesterday! 👋`;

return dedent`
Say hello to the <${url}|${members.length} members> who joined the Member Directory yesterday! 👋
${title}
`;
}

Expand Down Expand Up @@ -171,8 +181,13 @@ async function getResourcesMessage(): Promise<string | null> {
// Example: https://app.colorstack.io/resources?date=2024-08-15
url.searchParams.set('date', yesterday.format('YYYY-MM-DD'));

const title =
items.length === 1
? `Check out this <${url}|resource> posted yesterday! 📚`
: `Check out these <${url}|resources> posted yesterday! 📚`;

return dedent`
Check out these <${url}|resources> posted yesterday 📚:
${title}
${items}
`;
}
Expand Down

0 comments on commit f80a185

Please sign in to comment.