Skip to content

Commit

Permalink
Display proper names for Data Feed categories in filtering list (#1820)
Browse files Browse the repository at this point in the history
* Display proper names for Data Feed categories in filtering list
  • Loading branch information
dwightjl authored Mar 18, 2024
1 parent d72e584 commit c511b40
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions src/features/feeds/components/FeedList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,14 @@ export const FeedList = ({
const addrPerPage = 8
const lastAddr = Number(currentPage) * addrPerPage
const firstAddr = lastAddr - addrPerPage
const dataFeedCategory = ["low", "medium", "high", "custom", "new", "deprecating"]
const dataFeedCategory = [
{ key: "low", name: "Low Market Risk" },
{ key: "medium", name: "Medium Market Risk" },
{ key: "high", name: "High Market Risk" },
{ key: "custom", name: "Custom" },
{ key: "new", name: "New Token" },
{ key: "deprecating", name: "Deprecating" },
]
const chain = chains.filter((chain) => chain.page === selectedChain)[0]
const chainMetadata = useGetChainMetadata(chain, initialCache && initialCache[chain.page])
const wrapperRef = useRef(null)
Expand Down Expand Up @@ -189,14 +196,14 @@ export const FeedList = ({
<ul>
{dataFeedCategory.map((category) => (
<li>
<button onClick={() => handleCategorySelection(category)}>
<button onClick={() => handleCategorySelection(category.key)}>
<input
type="checkbox"
checked={selectedFeedCategories?.includes(category)}
checked={selectedFeedCategories?.includes(category.key)}
readonly
style="cursor:pointer;"
/>
<span> {category}</span>
<span> {category.name}</span>
</button>
</li>
))}
Expand Down

0 comments on commit c511b40

Please sign in to comment.