Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

load single item first works #158

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Conversation

Gyran
Copy link
Collaborator

@Gyran Gyran commented Mar 3, 2022

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!

* master: (23 commits)
  basic trader filter
  get back to latest TGB
  fix prettier formatting
  bump deps
  add missing prop
  update patreon
  add missing ammo props
  bump deps
  fix sizing collision with external part
  lock deps
  add explicit heights in more places
  fix logo size
  Improve CLS on desktop
  discord is back!
  bump deps
  fix some props for the calculator
  don't load unlimited amounts of data
  more properties!
  prettier
  bump deps
  ...
@netlify
Copy link

netlify bot commented Mar 3, 2022

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

🔨 Explore the source changes: a2085b5

🔍 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/

@kokarn
Copy link
Owner

kokarn commented Mar 4, 2022

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

@Gyran
Copy link
Collaborator Author

Gyran commented Mar 4, 2022

  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.

@kokarn
Copy link
Owner

kokarn commented Mar 5, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants