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

How to run enhancer in this setup? #10

Open
DavithkbY opened this issue Apr 12, 2024 · 1 comment
Open

How to run enhancer in this setup? #10

DavithkbY opened this issue Apr 12, 2024 · 1 comment
Assignees

Comments

@DavithkbY
Copy link

I've searched extensively but can't find a way to run an enhancer on the components in this project.
How is one supposed to do this?

@alexshyba
Copy link
Contributor

Hi @DavithkbY

Sorry for the late reply! You should be able to add enhancers here after composition is returned, inside handleComposition of the page handler src/pages/[[...slug]].tsx:

  handleComposition: async (routeResponse, _context) => {
    const { composition, errors } = routeResponse.compositionApiResponse || {};

    if (errors?.some(e => e.type === 'data' || e.type === 'binding')) {
      return { notFound: true };
    }

    // add your enhancer code here

Please ping [email protected] if you are having any issues.

@alexshyba alexshyba self-assigned this May 11, 2024
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