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

Error with post.pubDate?. is not a function #552

Open
Terieyenike opened this issue Sep 11, 2023 · 2 comments
Open

Error with post.pubDate?. is not a function #552

Terieyenike opened this issue Sep 11, 2023 · 2 comments

Comments

@Terieyenike
Copy link

Terieyenike commented Sep 11, 2023

In the getting started guide with Next.js, I discovered this error under the query and list posts section and fixed it with a function as shown below. It was possible as I passed the data in the function.

function getCurrentDate(date) {
    return new Date(date)
  }

JSX

<p className="text-xs mb-2 text-purple-950 dark:text-purple-200">{getCurrentDate(post.pubDate)?.toDateString()}</p>

https://xata.io/docs/getting-started/nextjs

@ayeankit
Copy link

hey @Terieyenike , I would like to work on this issue. Can you please assign me this?

@Terieyenike
Copy link
Author

@ayeankit I made the observation to be picked to work on it myself.

I'm a contributor like you.

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

No branches or pull requests

2 participants