Skip to content

fix: convert PostgreSQL BigInt to number for podcast count display#367

Draft
kellylimmm wants to merge 1 commit intomainfrom
fix/convert-bigint-to-number-podcast
Draft

fix: convert PostgreSQL BigInt to number for podcast count display#367
kellylimmm wants to merge 1 commit intomainfrom
fix/convert-bigint-to-number-podcast

Conversation

@kellylimmm
Copy link
Collaborator

Closes #349

🚀 Summary

This pull requests fixes the issue where the UI is showing podcasts instead of podcast when there is only 1.

Screenshot 2025-10-17 at 4 14 42 PM

Comment on lines +46 to +52
const collection = collections.map((collection) => ({
...collection,
numberOfPodcasts: Number(collection.numberOfPodcasts),
}));

return {
collections,
collections: collection,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should we inline this? 🤔


const collection = collections.map((collection) => ({
...collection,
numberOfPodcasts: Number(collection.numberOfPodcasts),
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why convert to number?

@kellylimmm kellylimmm marked this pull request as draft October 22, 2025 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Set condition when podcast is singular

3 participants