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: pages router support #287

Merged
merged 6 commits into from
Apr 4, 2024
Merged

fix: pages router support #287

merged 6 commits into from
Apr 4, 2024

Conversation

michalkvasnicak
Copy link
Collaborator

Change Summary

This PR fixes compatibility adapter with pages router.

Merge Checklist

  • PR has a Changeset
  • PR includes documentation if necessary
  • PR updates the boilerplates if necessary

@michalkvasnicak michalkvasnicak self-assigned this Apr 4, 2024
Copy link

vercel bot commented Apr 4, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
frames-js ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 4, 2024 1:55pm
framesjs-debugger ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 4, 2024 1:55pm

Copy link
Contributor

@stephancill stephancill left a comment

Choose a reason for hiding this comment

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

lgtm! a slightly more elaborate example will help a lot

@@ -0,0 +1,5 @@
import { createFrames, Button } from "frames.js/next/pages-router";
Copy link
Contributor

Choose a reason for hiding this comment

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

can we rename this to frames.ts and add another route to this example to demonstrate how you do multiple routes?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I had to move the file into api/frames folder because it was causing issues with compilation

Copy link
Contributor

@stephancill stephancill left a comment

Choose a reason for hiding this comment

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

forgot about this in my last comment, but would be nice to show how you would include this in an existing page as well, similar to how we do fetchMetadata in the app router examples

@michalkvasnicak
Copy link
Collaborator Author

forgot about this in my last comment, but would be nice to show how you would include this in an existing page as well, similar to how we do fetchMetadata in the app router examples

there already is in /examples/pages-router/index.tsx

@stephancill stephancill merged commit 5b7a07b into dev Apr 4, 2024
7 checks passed
@stephancill stephancill deleted the fix/pages-router-support branch April 4, 2024 14:02
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