Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(Press room): use the latest press release in the Press Room landing page #432

Merged
merged 9 commits into from
Sep 24, 2024

Conversation

DiogoSoaress
Copy link
Member

@DiogoSoaress DiogoSoaress commented Aug 2, 2024

What it solves

  • Displays the latest press release post in the Press room landing page.
  • Does not display Draft press releases in the page
  • Fetches a limit of 150 blog articles on build
  • Deletes the outdated featured field

Copy link

github-actions bot commented Aug 2, 2024

Branch preview

✅ Deployed successfully in branch deployment:

https://feature_latest_press_release--homepage.review.5afe.dev

@DiogoSoaress DiogoSoaress marked this pull request as draft August 12, 2024 08:55
@DiogoSoaress DiogoSoaress marked this pull request as ready for review September 23, 2024 13:33
@@ -23,7 +24,7 @@ const PressReleases = ({ allPosts }: { allPosts: PostEntryCollection }) => {
const { localAllPosts } = useAllPosts(allPosts)

const filteredPosts = useMemo(() => {
const pressPosts = localAllPosts.items.filter(isPressReleasePost)
const pressPosts = localAllPosts.items.filter((post) => isPressReleasePost(post) && !isDraft(post))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The two instances where isPressReleasePost is used, now included a non-draft check. Should we this the "default", and moved into the helper (or a combined one added)?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I agree it should be combined in the helper. Good suggestion!

@DiogoSoaress DiogoSoaress merged commit ab77018 into main Sep 24, 2024
4 checks passed
@DiogoSoaress DiogoSoaress deleted the feature-latest-press-release branch September 24, 2024 14:43
@github-actions github-actions bot locked and limited conversation to collaborators Sep 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants