Navbar Button Doesn't Work in Production with Gatsby and TypeScript #30697
Unanswered
Lloydinator
asked this question in
Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Description and steps to reproduce
The stack for my project is GatsbyJS, TypeScript, Twin Macro (TailwindCSS), and Emotion.
In my styles.tsx file, I style and define my navbar button like this:
Now my markup file, index.tsx looks like this:
Expected result
Buttons should be clickable in production like it is in development. There should be many more event listeners on my buttons in production than just
load
.Actual result
My buttons only work in development. I see all the event listeners you'd expect such as
click
, however, in production, onlyload
is there. I don't know why and it's very hard to debug. I've tried just making the nav button into a div but it still doesn't work. The only time buttons work in my app is when I use them in forms.Environment
Beta Was this translation helpful? Give feedback.
All reactions