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

feature: use datetime strings in fake api data #275

Merged
merged 3 commits into from
Apr 15, 2023

Conversation

johnhooks
Copy link
Collaborator

What?

Use the standard datetime strings used in the other REST API endpoints of WordPress in the fake api data.

Convert datetime strings into JS Dates at the time they are fetched from the API.

Why?

Using the standard datetimes makes the fake api more like the real thing.

Additions

  • Move the some of the constants out of the store folder, they are used in many place in the project.
  • Use /** @type {const} */ type assertions, JSDoc style as const.

@johnhooks johnhooks requested a review from erikyo April 15, 2023 22:53
Copy link
Collaborator

@erikyo erikyo left a comment

Choose a reason for hiding this comment

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

LGTM!

@johnhooks johnhooks merged commit 63b907b into WordPress:develop Apr 15, 2023
@johnhooks johnhooks deleted the feature/fake-api-datetime branch April 15, 2023 23:40
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.

2 participants