Next.js Discord

Discord Forum

Sessions

Unanswered
Alligator mississippiensis posted this in #help-forum
Open in Discord
Alligator mississippiensisOP
hey yall i got something interesting happening in my app.

I created an draggable component, its just a button that is draggable and when you click on it it opens up
I only show the button when the user is logged in, through session.

Whenever i restart the app , and i am still logged in through session, the button is on the page but i cannot interract with it, cant drag it, cant click it.
Until i logout and login again(without restarting the app).. then i can do everything agian.
If i refresh the page it becomes the same again, i cannot drag or click it until i logged out and logged in again

What could be the issue here?
I mean, i think i know what it is i just dont know how to solve it.

Its due to the session..

This is how i decide to display it or not.
Image
Whenever i change this to some boolean that is always true, i can interract with it no matter what..
If i log the session it is undefined the first time until i logout and login again, then i see the session info.

Maybe there is something with the Session Provider?

0 Replies