Next.js Discord

Discord Forum

button doesnt appear

Unanswered
cvaz posted this in #help-forum
Open in Discord
Hello! Ive added a button. Which apperantley doesnt appear.

  return (
    <div className="flex flex-col items-center justify-center min-h-screen py-2">
      <h1 className="text-4xl font-bold mb-4">Discord User API</h1>
      {error && <p className="text-red-500 mb-4">{error}</p>}
      {user ? (
        <div className="text-center">
          <p className="mb-4">Welcome, {user.global_name}!</p>
          <Button onClick={handleLogout}>Logout</Button>
          <Button onClick={handleUserInfo} className="mt-4">User Info</Button>
        </div>
      ) : (
        <Button onClick={handleLogin}>Login with Discord</Button>
      )}
    </div>
  )
}

Could someone help me resolve this?

19 Replies

@cvaz Click to see attachment
can you clarify your question.
@B33fb0n3 can you clarify your question.
What?
Im talking about the User Info button.
That one doesnt appear at any point.
@cvaz Im talking about the User Info button.
thanks for the clarification. The code looks correct for me. Can you provide a reproduction of the issue? Either via github or directly via https://codesandbox.io/
(of course remove the credentials and sensitive information - maybe work with static data)
@cvaz can you share it?
ill try to share it like next week
@gin U mean the User Info button?
Yeah
@cvaz Yeah
Can u inspect the Logout element
and check if the info button is rendered under it
@gin Can u inspect the Logout element
I cant right now
Im not at my pc
👍
Later?
sure just write in here
i will see it