Comments (11)
Looks like you're passing undefined data in selectFilter(). Have you added the products in the database using the admin user? You must uncomment all the admin-related stuffs inside src/routers/AppRouter.js and lastly, inside src/reducers/authReducer.js, just change the type property of initState from 'client' into 'admin' to use the admin mode. Then only you can perform CRUD operations.
from ecommerce-react.
I Figured it out by myself there was a small error. I had to initialize the admin type separately. the initState did not work for the admin type.
I Recommend we should use firebase rules with custom claims. that way you don't have to worry about the dashboard section. any way thanks
from ecommerce-react.
Looks like you're passing undefined data in selectFilter(). Have you added the products in the database using the admin user? You must uncomment all the admin-related stuffs inside src/routers/AppRouter.js and lastly, inside src/reducers/authReducer.js, just change the type property of initState from 'client' into 'admin' to use the admin mode. Then only you can perform CRUD operations.
I did as you asked but how to login to admin pannel.
from ecommerce-react.
Looks like you're passing undefined data in selectFilter(). Have you added the products in the database using the admin user? You must uncomment all the admin-related stuffs inside src/routers/AppRouter.js and lastly, inside src/reducers/authReducer.js, just change the type property of initState from 'client' into 'admin' to use the admin mode. Then only you can perform CRUD operations.
I tried to login using the available signin method but it is not redirecting to admin dashboard. Am i missing anything.
from ecommerce-react.
The default user auth could've been persisting. Log out the default user or you can delete the auth details of user in localStorage. Then you must be able to get to the /dashboard page
from ecommerce-react.
The admin doesn't have the available login methods unlike the client does. That's the problem that I have with the admin authentication.
from ecommerce-react.
The default user auth could've been persisting. Log out the default user or you can delete the auth details of user in localStorage. Then you must be able to get to the /dashboard page
I did everything man still the dashboard is not opening. Is there any other things i need to keep in mind.
see i have a work around for this error but i need to get to the admin dashboard to fix it.
from ecommerce-react.
Are you getting any error or it just don't redirect you to the admin?
from ecommerce-react.
Have you done all this?
- Uncomment all admin-stuffs inside src/routers/AppRouter.js
- Inside src/reducer/authReducer.js, if you don't want a test user, delete or comment out the initState variable and set the state to an empty object {} If you want to use admin, you must change type property to 'admin' to use admin mode.
- Delete the auth data in localStorage if it exists (i think the key name is 'root')
from ecommerce-react.
Are you getting any error or it just don't redirect you to the admin?
After Clearing the localstorage i am being redirected to dashboard but for few second only. then again it is going back to the homepage
from ecommerce-react.
Great! It would be awesome if you could make a pull request for these necessary changes. 👌
from ecommerce-react.
Related Issues (20)
- Getting 'Product thumbnail image is required' alert when I try to update an existing product. HOT 1
- Blank white screen HOT 3
- problem with dev-server
- stuck on sign in HOT 1
- Making the code mobile responsive
- In the header of the page shop the design is not displaying well (Go to home and click shop now to see the page)
- Is there a detailed firebase guide?
- Need to update ReadMe doc HOT 1
- Not able to manage or see users from the admin panel
- Could not reach Cloud Firestore backend
- How to run with localhost and remove CORS? HOT 1
- Salut vous pouvez m'aider à avoir le code source complèt
- no featured products found & no recommend products found
- getting blank screen after fixing from issues closed by you also HOT 2
- not running on my local
- difficulty in finding firestore db url HOT 1
- Text not vertically centered HOT 1
- Error while sign up HOT 1
- Feature: Add Tooltips HOT 1
- checkout works on local but dose not work on server HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ecommerce-react.