Closed alquador closed 2 years ago
It looks like your getOneProfile() expects two arguments, but is only getting one when you call it, so the profileID
is missing when the function runs
I tried adding an id within the useEffect getOneProfile function to have two arguments, yet it still is only able to grab the user successfully. I have yet to successfully log the profile Id anywhere. Am I calling profileId wrong?
Readjusted some variable names and how things were getting called, fixed!
What stack are you using?
(ex: MERN(mongoose + react), DR(django + react), PEN, etc.)
DR
What's the problem you're trying to solve?
I have been trying to have my show page display. Each way I have tried changing the syntax to access the id it has been returning undefined. I double checked that the route is successful in Postman for grabbing specific ids from the models.
Post any code you think might be relevant (one fenced block per file)
If you see an error message, post it here. If you don't, what unexpected behavior are you seeing?
What is your best guess as to the source of the problem?
I think I am accessing it wrong, but I have trying changing the syntax of the id with no luck. I can't type it into the browser specifically because then there is no auth token to view the show page. Everything I have tried returns undefined.
What things have you already tried to solve the problem?
I have googled specifics seeing how others have accessed django psql api through react. I have tried changing the syntax of the id and console logging at every step of the way.
Paste a link to your repository here https://github.com/alquador/Project-4-Client