flatlogic / react-dashboard

🔥React Dashboard - isomorphic admin dashboard template (React.js, Bootstrap, Node.js, GraphQL, React Router, Babel, Webpack, Browsersync) 🔥
https://flatlogic.com/admin-dashboards/react-dashboard/demo
1.58k stars 368 forks source link

Error when Yarn Dev #23

Closed Vn-ChemGio closed 4 years ago

Vn-ChemGio commented 4 years ago

In first time Load, screen need loading Login But no token or invalid token in localStorage So When run src/pages/login/Login.js has error at line 43

return date < data.exp; change to return data && date < data.exp; has fix it

And when load dashboard, has some error by posts null check /src/actions/posts and fix Please

guardofparadise commented 4 years ago

Hi, you have to set up database locally and connect react-dashboard to it, please, let me know, your database is running locally or not?

Vn-ChemGio commented 4 years ago

I'm running by command yarn dev, when I clone your project, So I don't know database run in local or not, but I had been not changed file in /server directory after clone Butin Chrome dev tool, I seen /graphql api has been call and response data so something is null

Note: You can see 2 problem in my issue

  1. src/pages/login/Login.js has error at line 43 after clone becase jwt decode fail => data null
  2. Error by posts null
guardofparadise commented 4 years ago

Please, consider looking through the readme file, you have to set up database to be able to add posts to the dashboard, if you don't want to have crud functionality run project in development mode