{"action":"closed","issue":{"url":"https://api.github.com/repos/creativetimofficial/ct-material-dashboard-pro-react/issues/60","repository_url":"https://api.github.com/repos/creativetimofficial/ct-material-dashboard-pro-react","labels_url":"https://api.github.com/repos/creativetimofficial/ct-material-dashboard-pro-react/issues/60/labels{/name}","comments_url":"https://api.github.com/repos/creativetimofficial/ct-material-dashboard-pro-react/issues/60/comments","events_url":"https://api.github.com/repos/creativetimofficial/ct-material-dashboard-pro-react/issues/60/events","html_url":"https://github.com/creativetimofficial/ct-material-dashboard-pro-react/issues/60","id":347016648,"node_id":"MDU6SXNzdWUzNDcwMTY2NDg=","number":60,"title":"Trying to create 404 page","user":{"login":"munroe7","id":7092398,"node_id":"MDQ6VXNlcjcwOTIzOTg=","avatar_url":"https://avatars2.githubusercontent.com/u/7092398?v=4","gravatar_id":"","url":"https://api.github.com/users/munroe7","html_url":"https://github.com/munroe7","followers_url":"https://api.github.com/users/munroe7/followers","following_url":"https://api.github.com/users/munroe7/following{/other_user}","gists_url":"https://api.github.com/users/munroe7/gists{/gist_id}","starred_url":"https://api.github.com/users/munroe7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/munroe7/subscriptions","organizations_url":"https://api.github.com/users/munroe7/orgs","repos_url":"https://api.github.com/users/munroe7/repos","events_url":"https://api.github.com/users/munroe7/events{/privacy}","received_events_url":"https://api.github.com/users/munroe7/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":10,"created_at":"2018-08-02T13:40:04Z","updated_at":"2018-08-02T15:21:05Z","closed_at":"2018-08-02T15:21:05Z","author_association":"NONE","body":"I have been trying to create my own 404 page but it doesn't appear to be working with the main router (src/index.js)\r\n\r\nI tried to add the route last with no path provided. I tried to create a basic react app and putting a route with no path always triggered the 404 view.\r\n\r\n```javascript\r\nimport indexRoutes from \"routes/index.jsx\";\r\nimport Error404 from \"views/error404.jsx\"\r\n\r\nimport \"assets/scss/material-dashboard-pro-react.css?v=1.2.0\";\r\n\r\nconst hist = createBrowserHistory();\r\n\r\nReactDOM.render(\r\n  <Router history={hist}>\r\n      <div>\r\n          <Switch>\r\n              {indexRoutes.map((prop, key) => {\r\n                  return <Route path={prop.path} component={prop.component} key={key} />;\r\n              })}\r\n              <Route component={Error404}/> //Injected after other routes\r\n          </Switch>\r\n      </div>\r\n\r\n  </Router>\r\n````\r\n\r\nAnd also tried adding it to the main index.jsx. Since path would be generated either way, I entered '*' for the path which was another method of getting 404s to render. \r\n\r\n```javascript\r\nimport Auth from \"layouts/Auth.jsx\";\r\nimport Main from \"layouts/Main.jsx\";\r\nimport Error404 from \"views/error404.jsx\"\r\n\r\nvar indexRoutes = [\r\n    { path: \"/auth\", name: \"Auth\", component: Auth },\r\n    { path: \"/\", name: \"Home\", component: Main },\r\n    { path: \"*\", name: \"Error\", component: Error404 },  //Included here so it gets generated later\r\n];\r\n\r\nexport default indexRoutes;\r\n\r\n```\r\n\r\nDoes anyone have any solutions? Right now, every url seems to load the Main or Auth component\r\n\r\n/auth/asdsdf   -> shows blank Authlayout (Auth is just the layout used for pages demo)\r\n/asdsdsd -> shows the Main layout"}}
{"actor":{"display_login":"munroe7"}}