Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a User Dashboard component #3

Open
kunaljain0212 opened this issue Dec 5, 2020 · 16 comments
Open

Create a User Dashboard component #3

kunaljain0212 opened this issue Dec 5, 2020 · 16 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@kunaljain0212
Copy link
Owner

A file already exists in the user folder for userDashboard.
Edit that component and display the user's email and name.

@kunaljain0212 kunaljain0212 added enhancement New feature or request good first issue Good for newcomers labels Dec 5, 2020
@headphone-rachit
Copy link

Hey @kunaljain0212 can you assign me this work?

@kunaljain0212
Copy link
Owner Author

Sure go ahead!

@headphone-rachit
Copy link

Hey I have seen the project files but I am unable to understand from where I have to fetch the user name and email, so can you please help me.

@kunaljain0212
Copy link
Owner Author

https://github.com/kunaljain0212/Apni-Dukaan-Backend/blob/master/routes/user.js
This is the backend repo for this project. In the above-mentioned file, we already have a route to get user details. You can use that particular route for fetching user details.

@khush021
Copy link
Contributor

Is someone working on this currently? can I pick this up?

@kunaljain0212
Copy link
Owner Author

Sure go ahead! @khush021

@kunaljain0212
Copy link
Owner Author

If you are facing problem in setting up the backend then you can use this link:
https://apni-dukaan-backend.herokuapp.com/
To use this link create a .env file as example.env and add this backend link to the backend variable.

@khush021
Copy link
Contributor

Is there any issue with the backend because these APIs are not returning any response
https://apni-dukaan-backend.herokuapp.com/products
https://apni-dukaan-backend.herokuapp.com/signin

@kunaljain0212
Copy link
Owner Author

The backend is designed such that you'll have to use /api before accessing any route.
For ex. https://apni-dukaan-backend.herokuapp.com/api/products

@khush021
Copy link
Contributor

okay got it

@khush021
Copy link
Contributor

Can you please guide me how to pass values from one component to another. I am trying to use access name and email from signIn to userDashboard

@kunaljain0212
Copy link
Owner Author

For a signed in user we have a middleware which sets a property user in the req object whenever any restricted route is accessed. So what you can do is make the user dashboard a restricted route which it practically should be and then just fetch the user details from the user property of the req object.

@khush021
Copy link
Contributor

got it

@khush021
Copy link
Contributor

I raised a request, can you please review it

@kunaljain0212
Copy link
Owner Author

@khush021 Can you give the component a bit of styling? If not please open an issue for the same.

@khush021
Copy link
Contributor

created issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants