tarkov-tools icon indicating copy to clipboard operation
tarkov-tools copied to clipboard

load single item first works

Open Gyran opened this issue 2 years ago • 4 comments

When opening an item, try to load as little data as possible to be able to display something quickly. Then load everything and show everything!

Gyran avatar Mar 03 '22 23:03 Gyran

✔️ Deploy Preview for tarkov-tools-preview ready!

🔨 Explore the source changes: a2085b50088a790499ffbbffb774076b12265fd5

🔍 Inspect the deploy log: https://app.netlify.com/sites/tarkov-tools-preview/deploys/622158329a8f8800084e2794

😎 Browse the preview: https://deploy-preview-158--tarkov-tools-preview.netlify.app/

netlify[bot] avatar Mar 03 '22 23:03 netlify[bot]

Great work! This would help that page SO much....

Some notes:

  1. All items are still loaded, can we avoid that or make sure that triggers after the single item is done?
  2. If we have a redirect it seems to render a failed page instead? Example is 9x39mm-bp on preview vs 9x39mm-bp on live
  3. Loading items by id seems to load in a weird order. Loading page -> error page -> item page. bitcoin item by id

kokarn avatar Mar 04 '22 07:03 kokarn

  1. I'll see what I can do
  2. From what I can see, redirects are done in the worker part of the site? So I guess that dosen't work the same on netlify?
  3. Because we get the item by id a little later, I could get by normalized name and id at the same time for single item so it would be a little slower but catch that case that we do the redirect when all items has loaded.

Gyran avatar Mar 04 '22 19:03 Gyran

Ah, yeah 2. makes sense 👍 and good call on the others

kokarn avatar Mar 05 '22 08:03 kokarn