Hey there, I am currently working on a project where a button click triggers a request to the backend and executes a function on the frontend. In my code, I am using the default Shadowcn button with an onClick event. Everything works smoothly when I run the code on localhost on my PC. But, when I host it on Vercel and open it on my iPhone, the button doesn't always work properly. Sometimes I have to click the button once for the function to run, other times I need to click it up to 10 times. Does anyone have a solution for this issue?
Here is the code snippet, the button in question is the "Print label" button.
[insert your modified code here]