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

Fix CommandMenu not mapping over posts after converting to content collections and not navigating to posts onSelect #258

Closed
AVGVSTVS96 opened this issue Apr 24, 2024 — with Linear · 1 comment
Assignees
Labels
bug Something isn't working

Comments

Copy link
Owner

AVGVSTVS96 commented Apr 24, 2024

The issue stems from the date object pubDate, after switching to content collections I changed the dates in blog post frontmatter to ISO style. So now when passing post.data.pubDate React receives a Date object which cannot be rendered as a direct child of a React component.

In addition, I cannot use data.post.url to navigate to links, when using content collections the navigate function needs to be updated to (/posts/${post.slug}/)

@AVGVSTVS96 AVGVSTVS96 added the bug Something isn't working label Apr 24, 2024 — with Linear
@AVGVSTVS96 AVGVSTVS96 self-assigned this Apr 24, 2024
@AVGVSTVS96 AVGVSTVS96 changed the title Fix CommandMenu not mapping over posts after converting to content collections Fix CommandMenu not mapping over posts after converting to content collections and not navigating to posts onSelect Apr 24, 2024
AVGVSTVS96 added a commit that referenced this issue Apr 24, 2024
…e to posts/slug

Navigate was previously using href but this doesn't work after converting to content collections, `navigate(`/posts/${post.slug}/`)` is needed
AVGVSTVS96 added a commit that referenced this issue Apr 24, 2024
…e to posts/slug (#260)

Navigate was previously using href but this doesn't work after converting to content collections, `navigate(`/posts/${post.slug}/`)` is needed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant