Fix issue stemming from using resource name instead of slug name

In the URL, the resource name was used instead of the slug name. Maybe the API changed or it worked on some resources, but I had a resource with a space in its name and that didn't work. To counter that I added `encodeUI` which shouldn't hurt anyway but mostly I use the `slug` sent back by the API.

I also changed the line endings to Unix on the `.jsx` file. That could be argued against I imagine, but it didn't let me open the file properly in my editor with Windows line endings…