button doesnt appear
Unanswered
cvaz posted this in #help-forum
cvazOP
Hello! Ive added a button. Which apperantley doesnt appear.
Could someone help me resolve this?
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 Hello! Ive added a button. Which apperantley doesnt appear.
ts
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?
It looks like you are already logged in. Like that the "Login with Discord" button won't be visible. Logout to show the "Login with Discord" button again
@cvaz Click to see attachment
can you clarify your question.
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)
(of course remove the credentials and sensitive information - maybe work with static data)
@cvaz can you share it?
cvazOP
ill try to share it like next week
@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
cvazOP
I cant right now
Im not at my pc
👍
cvazOP
Later?
sure just write in here
i will see it