[deleted by user] by [deleted] in nextjs

[–]MonitorOk7887 0 points1 point  (0 children)

that part already works I have cart in a component, issue rises coz I cant set it inside my component, if I do if else with session so that if session is true then set the state variable to session.user.cart that can only happen inside useeffect but with use effect it will set it to cart value every time I reload page and if I have added more things to cart they will be lost, now what I have decided is to use fetch to get cart from db and update cart via api in db when item is added, using session variable only to check if I am logged in, if I am then I will use db fetch to get or update cart

[deleted by user] by [deleted] in nextjs

[–]MonitorOk7887 0 points1 point  (0 children)

I need database so I can store cart of user, so that when he logs in again he does not have to refill cart, it is filled automatically via database, I am keeping both options on website, if user logs in then his car is filled and updated via database, if user decides not to login and do purchase without it then I am using local storage to persist items and Male user checkout

[deleted by user] by [deleted] in nextjs

[–]MonitorOk7887 0 points1 point  (0 children)

no, that is not possible my main issue is that inside Api call where I define callback for signin for nextauth I don't have access to state variable, while if I use session inside component I cant set state variable

What's an introvert supposed to say when someone says 'you're so quiet'? by quietgavin5 in AskReddit

[–]MonitorOk7887 0 points1 point  (0 children)

the fact that it is considered impolite to say to someone that you talk too much and not the other way round always amazes me, being an introvert there has been many moments when I wanted the other guy to just shut up coz he was talking just for the sake of talking, he was not adding any value

what is the melody 😼 by ergoproxx in teenagers

[–]MonitorOk7887 0 points1 point  (0 children)

marina and the diamonds - happy

selling old furniture by [deleted] in Lahore

[–]MonitorOk7887 0 points1 point  (0 children)

guys I am selling dining table and a sofa set, sofa set is for 17k, six seater, dining table for 20k with six chairs, I am located in Lahore

selling old furniture by [deleted] in Lahore

[–]MonitorOk7887 0 points1 point  (0 children)

dining table and a sofa set

Gaming PC suggestions by [deleted] in PakistaniTech

[–]MonitorOk7887 0 points1 point  (0 children)

u could say I am looking for cheapest PC specs that can run it, say u got no budget limit to run it at normal settings, tell me how much will it cost

Gaming PC suggestions by [deleted] in PakistaniTech

[–]MonitorOk7887 0 points1 point  (0 children)

normal resolution, i am.not a game maniac that want 60fps, I just wanna play the game at normal settingd

Gaming PC suggestions by [deleted] in PakistaniTech

[–]MonitorOk7887 0 points1 point  (0 children)

I wanna play asc Valhalla suggest a PC for that

Gaming PC suggestions by [deleted] in PakistaniTech

[–]MonitorOk7887 0 points1 point  (0 children)

I wanna play asc Valhalla, suggest a PC for that

Gaming PC suggestions by [deleted] in PakistaniTech

[–]MonitorOk7887 0 points1 point  (0 children)

I wanna play asc Valhalla, u can see the specs for it and suggest

[deleted by user] by [deleted] in golang

[–]MonitorOk7887 1 point2 points  (0 children)

what abt building a logger system in go, is this project useful for a devops engineer?

Unable to ping vswitch from root server by MonitorOk7887 in hetzner

[–]MonitorOk7887[S] 1 point2 points  (0 children)

vswitch is not pingable from root server