AlexsLemonade / refinebio-web

Refinebio Web
https://staging.web.refine.bio
BSD 3-Clause "New" or "Revised" License
1 stars 0 forks source link

Fetch compendia resources in each tab #405

Open nozomione opened 4 days ago

nozomione commented 4 days ago

Context

Currently, we fetch the compendia resources at the page level all at once during page load and pass the API response down to each tab as a prop. We want to enable each tab to independently handle the data fetching of its corresponding resource.

Problem or idea

We should move the data-fetching location from pages/[type] to each tab (i.e., the normalized and RNA-Seq Sample tabs) using the URL query and memoizing the response.

Solution or next step

  1. Move the data-fetching logic from pages/[type] to NormalizedTab and RNASeqTab utilizing query.type and useMemo
  2. Handle the error at the shared Download sub-component