rollthecloudinc / quell

Climate aware CMS breaking web apps free from carbon emissions.
https://demo.carbonfreed.app/pages/create-panel-page
GNU General Public License v3.0
14 stars 1 forks source link

Fix Marvel Character Browser #245

Open ng-druid opened 2 years ago

ng-druid commented 2 years ago

The marvel character browser is not paginating properly when pre-rendered. When users scroll the same page is loaded over and over with a limit of 20 and offset 0. What is frustrating is the same page not pre-rendered seems to work fine. I've had enough with this virtual list.


The reason nothing is showing on prod (ng-druid.com) for this page is because the URL being used is this:

https://demo.ng-druid.com/gateway.marvel.com:443/v1/public/characters?apikey=XXX&orderBy=name&limit=20&offset=0

However, it should be this.

https://gateway.marvel.com:443/v1/public/characters?apikey=XXX&orderBy=name&limit=20&offset=0

I believe this has something to do with pre-rendering since it works fine running from the local server or as a native js app instead of pre-rendered.

There might need to be a modification to the rest datasource to prevent adding the protocol and host on the server when it is already included in the URL. This is my best guess without diving into the issue further.


The url generated by the url generator is malformed. For some reason it works on local but not in prod. The reason doesn't necessarily matter in that regards. Instead focus on fixing urls being malformed when put through the url generator.

The url ends up as http:/xxx... instead of http://xxx... due to using split on / and joining them all together.

Screen Shot 2022-05-26 at 8 45 07 PM