#it is not about pocketbase how can i

1 messages · Page 1 of 1 (latest)

rare warren
#

It can be about pocketbase

#

is authStore a client or server thing

vestal crown
#

server

rare warren
#

and this is auth for each individual?

vestal crown
#

yep

rare warren
#

i assume pocketbase is accessing headers or cookies?

vestal crown
#

yes

#

i think so

#

or if i remember correctly

#

either way, cant we look at it as in the server will send a true or false value

#

and that's it

rare warren
#

well

#

the reason i am calling out pocketbase specifcally

#

because how its getting it is important

vestal crown
#

so i make a server component that takes care of the result (true or false) and add two contionally rendered cliet components

rare warren
#

like you need to understand if its server or client where the store is

#

but yes

#

if its server checks

vestal crown
rare warren
#

knowing if this is being on the client or server

#

is important to how its rendered

vestal crown
#

i see

#

thanks dude

rare warren
#

i look at example code

#

and it seems like pb.authStore is server

#

since its ran on serverSide props

#

so if thats the case then

#

make the button a client component

vestal crown
#

we do the approach that i mentionnd?

rare warren
#

basically ur code

#

can almost stay the same

#

u just remove use client

#

and make the button a client component

#

and import it

vestal crown
#

alright

#

thanks headless

#

tho u arent headless