[▲ Vercel Community](/) · [Categories](/categories) · [Latest](/latest) · [Top](/top) · [Live](/live) [Help](/c/help/9) # Button not showing on Prod (but works on local) 19 views · 0 likes · 2 posts SergyLavrov (@sergyoubi) · 2025-12-25 <!-- Questions that get answered the fastest are the ones with relevant info included in the original post. Be sure to include all detail needed to let others see and understand the problem! --> <!-- Current versus Expected behavior --> <!-- Code, configuration, and steps that reproduce this issue --> <!-- Project information (URL, framework, environment, project settings) --> Please HELP!!! I have an annoying issue/bug in my NextJS app or Vercel ?? (I know it’s Christmas, sorry; but this has a big impact on prod) I’m fetching data in a server component, then I want to conditionally show a Button based on certain condition using **logical and** (&&) or **ternary operator** (`? :`). Anyway everything works on dev environment, but when deployed on Vercel, nothing is shown. I’ve already purged vercel cache, redeployed app, but I didn’t work. WHY ?? I’m using Next 15.2.6 but looking at deployment summary on Vercel they use Next 15.5.9. I don’t know if that’s cause of the issue (or Not). ``` const Main = async () => { const { user } = await authenticateUser(); ..... return ( <div className="..."> {user?.account_type === "Free" && ( <Button className="..."> Upgrade </Button> )} </div> ); }; ``` Jacob Paris (@jacobparis) · 2026-01-05 (sorry for the slow response, catching up after holidays) This is almost definitely an issue with your `authenticateUser()` hook. There are lots of reasons why auth would work in development but not in prod, namely that you may not be correctly logged in. I recommend adding a console.log(user) right after it and seeing what it returns in production The `&&` operator is working correctly, but `user?.account_type === "Free"` is returning false and therefore it displays nothing. If you switch it for a ternary you should see the other case ``` {user && user.account_type === "Free" ? ( <button>Upgrade</button> ) : ( <p> Not a free account </p> )} ``` If logging the user confirms you aren't logged in, go through your login process again and try to see where it fails. For example, if your login process returns a session cookie that doesn't have your production domain on it, the browser will reject it. That's a pretty common bug that causes dev/prod parity issues