Link elements not working, getting 404

Howdy all, so I understand the elements are transformed into components in Next.js. Still running into an issue where it seems instead of getting the desired http://localhost:3000/api/auth/login, I’m getting a 404 on this:

route-loader.js?ea34:100 GET http://localhost:3000/_next/static/chunks/pages/api/auth/[...auth0].js net::ERR_ABORTED 404 (Not Found)

I put in a ternary operator to select the variant, but otherwise I didn’t intend to override the other props.

The element points to /api/auth/login, and does not include the base URL.

Screenshot 2021-11-21 091935.jpg

If you just render a Link to that href instead of the Plasmic Component, does that work for you?

Thanks for your fast response, Yang.

At first the answer was no, but I got to work and now I have the Plasmic component successfully hitting the Auth0 callback and rendering the correct variant based on whether there is a user session.

I also reduced the number of variants, because it was only necessary to have one toggle variant from the base. Before I had a base and 2 variants. Correct conditional, without ternary:

Screenshot 2021-11-23 071231.jpg