AlexsLemonade / refinebio-web

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

Use query.type and getReadable in the compendia [type] page component #377

Closed nozomione closed 6 days ago

nozomione commented 1 month ago

Context

Epic: #366

In PR #321, we introduced helpers/getReadable and config/readable.

In this issue, we want to expand their usage by using getReadable in the compendia [type] page component.

Additionally, we will update its sub-component Tabs to incorporate getReadable as part of this process.

Problem or idea

We should refactor the [type] component to utilize the type query from the URL, and use getReadable to set the prefix for the PageTitle component.

Next, we should adjust the sub-component Tabs to leverage both type and getReadable.

Solution or next step

  1. In the [type] page component:
    • Use router to get the type query
    • Use getReadable to set the page title
  2. In the Tabs sub-component:
    • Replace query.type with the type prop
    • Use getReadable to set the tab title