{"action":"created","issue":{"url":"https://api.github.com/repos/AtelierCartographie/eatlas/issues/81","repository_url":"https://api.github.com/repos/AtelierCartographie/eatlas","labels_url":"https://api.github.com/repos/AtelierCartographie/eatlas/issues/81/labels{/name}","comments_url":"https://api.github.com/repos/AtelierCartographie/eatlas/issues/81/comments","events_url":"https://api.github.com/repos/AtelierCartographie/eatlas/issues/81/events","html_url":"https://github.com/AtelierCartographie/eatlas/issues/81","id":305259254,"number":81,"title":"Servir l'admin dans un /sousdossier","user":{"login":"jri-sp","id":5879903,"avatar_url":"https://avatars0.githubusercontent.com/u/5879903?v=4","gravatar_id":"","url":"https://api.github.com/users/jri-sp","html_url":"https://github.com/jri-sp","followers_url":"https://api.github.com/users/jri-sp/followers","following_url":"https://api.github.com/users/jri-sp/following{/other_user}","gists_url":"https://api.github.com/users/jri-sp/gists{/gist_id}","starred_url":"https://api.github.com/users/jri-sp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jri-sp/subscriptions","organizations_url":"https://api.github.com/users/jri-sp/orgs","repos_url":"https://api.github.com/users/jri-sp/repos","events_url":"https://api.github.com/users/jri-sp/events{/privacy}","received_events_url":"https://api.github.com/users/jri-sp/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-03-14T17:34:34Z","updated_at":"2018-03-14T20:58:19Z","closed_at":null,"author_association":"COLLABORATOR","body":"J'ai un nouveau souci depuis que je sers l'admin dans http://hostname/admin/\r\n\r\nLes routes du client ne prennent pas en compte ce chemin de base et donc dès que l'appli React est chargée le `/admin/` disparait de l'URL et n'est pas intégré aux boutons/liens.\r\nOn ne peut pas non plus faire un refresh des pages parce que l'URL n'est pas la bonne.\r\nBref, tout est prévu pour fonctionner sur `/`.\r\n\r\nEst-ce qu'on pourrait faire en sorte que la variable `PUBLIC_URL` soit également utilisée pour construire les routes et les liens ?\r\n\r\nJ'ai vu qu'on pouvait rajouter une option `basename` au routeur: https://github.com/ReactTraining/react-router/blob/master/packages/react-router-dom/docs/api/BrowserRouter.md\r\nmais j'y connais pas grand chose en React donc j'en appelle à votre expertise :)\r\n\r\nJe pensais à un:\r\n```\r\n      <BrowserRouter basename={process.env.PUBLIC_URL}>\r\n```\r\nici: https://github.com/AtelierCartographie/eatlas/blob/master/client/src/components/Root.js#L25\r\n\r\n\r\nMerci!"},"comment":{"url":"https://api.github.com/repos/AtelierCartographie/eatlas/issues/comments/373172409","html_url":"https://github.com/AtelierCartographie/eatlas/issues/81#issuecomment-373172409","issue_url":"https://api.github.com/repos/AtelierCartographie/eatlas/issues/81","id":373172409,"user":{"login":"naholyr","id":214067,"avatar_url":"https://avatars2.githubusercontent.com/u/214067?v=4","gravatar_id":"","url":"https://api.github.com/users/naholyr","html_url":"https://github.com/naholyr","followers_url":"https://api.github.com/users/naholyr/followers","following_url":"https://api.github.com/users/naholyr/following{/other_user}","gists_url":"https://api.github.com/users/naholyr/gists{/gist_id}","starred_url":"https://api.github.com/users/naholyr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/naholyr/subscriptions","organizations_url":"https://api.github.com/users/naholyr/orgs","repos_url":"https://api.github.com/users/naholyr/repos","events_url":"https://api.github.com/users/naholyr/events{/privacy}","received_events_url":"https://api.github.com/users/naholyr/received_events","type":"User","site_admin":false},"created_at":"2018-03-14T20:58:19Z","updated_at":"2018-03-14T20:58:19Z","author_association":"CONTRIBUTOR","body":"Je regarde ça demain, il y a de grandes chances que la piste du basename soit bonne. En revanche à ma connaissance elle ne prend pas une URL mais plutôt un \"path\", du coup il nous faudra une nouvelle variable dédiée à ça. Mais de là ça devrait faire le job."}}
{"actor":{"display_login":"naholyr"}}