Skip to content

fix: update next template with getStaticPaths #292

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

Merged
merged 8 commits into from
Jun 23, 2021

Conversation

vincentchalamon
Copy link
Contributor

@vincentchalamon vincentchalamon commented Jun 18, 2021

Q A
Branch? main
Tickets #289 #288
License MIT
Doc PR N/A

@vincentchalamon vincentchalamon self-assigned this Jun 18, 2021
@vincentchalamon vincentchalamon marked this pull request as draft June 18, 2021 09:04
@vincentchalamon vincentchalamon marked this pull request as ready for review June 18, 2021 09:24
@artandor
Copy link
Contributor

Hi, do you have any idea when this might be merged ? Both mercure integration, pagination and staticPath are very interesting and much needed for the generator.

If something is missing, i'd gladly help if i can

Copy link
Member

@dunglas dunglas left a comment

Choose a reason for hiding this comment

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

Great job!

const response = await fetch("/{{{name}}}");

return {
paths: response.data["hydra:member"].map(({{{lc}}}) => `${ {{~lc}}['@id'] }/edit`),
Copy link
Member

Choose a reason for hiding this comment

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

What about the second page etc? Shouldn't we not pre-generate this?

Copy link
Contributor Author

@vincentchalamon vincentchalamon Jun 23, 2021

Choose a reason for hiding this comment

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

Fixed in this commit, but not really sure about what I've done 😆

@vincentchalamon vincentchalamon requested a review from dunglas June 23, 2021 16:51
@dunglas dunglas merged commit 0b83722 into api-platform:main Jun 23, 2021
@dunglas
Copy link
Member

dunglas commented Jun 23, 2021

Thanks Vincent!

@vincentchalamon vincentchalamon deleted the fix/289 branch June 23, 2021 18:33
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.

Update Next.js template for "getStaticPaths" Implement Mercure hook
5 participants