Skip to content

Commit

Permalink
fix: 🐛 trade price process
Browse files Browse the repository at this point in the history
  • Loading branch information
lucca180 committed Oct 29, 2023
1 parent 9a971c7 commit 1ff65a4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions components/Card/CardBase.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ const CardBase = (props: Props) => {
p={2}
textAlign="center"
fontWeight="bold"
as={'h3'}
bg={`rgba(${color[0]}, ${color[1]}, ${color[2]}, .6)`}
>
{props.title}
Expand Down
6 changes: 3 additions & 3 deletions components/Items/ItemDrops.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const ItemDrops = (props: Props) => {

if (isLoading)
return (
<CardBase title="This item can drop" color={color}>
<CardBase title="Item Drops" color={color}>
<Flex gap={3} wrap="wrap" justifyContent="center">
{Object.values(itemDrops).map((item) => (
<ItemCard key={item.item_iid} isLoading small />
Expand All @@ -54,7 +54,7 @@ const ItemDrops = (props: Props) => {
);

return (
<CardBase title="This item can drop" color={color}>
<CardBase title="Item Drops" color={color}>
{itemOpenable.isGBC && (
<Alert borderRadius={5} mb={3}>
<AlertIcon />
Expand Down Expand Up @@ -193,7 +193,7 @@ const ItemDrops = (props: Props) => {
</Flex>
{!isChoice && !!itemOpenable.openings && (
<Text textAlign={'center'} mt={4} fontSize="xs" color="gray.300">
Data on {itemOpenable.openings} opening reports.{' '}
{item.name} drop odds on {itemOpenable.openings} opening reports.{' '}
<Link as={NextLink} href="/contribute" color="gray.400">
Learn How To Help
</Link>
Expand Down
3 changes: 2 additions & 1 deletion pages/api/v1/prices/process.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,8 @@ const POST = async (req: NextApiRequest, res: NextApiResponse) => {

// list of unique entries
const uniqueNames = [...processList].filter(
(value, index, self) => index === self.findIndex((t) => genItemKey(t) === genItemKey(value))
(value, index, self) =>
index === self.findIndex((t) => genItemKey(t, true) === genItemKey(value, true))
);

for (const item of uniqueNames) {
Expand Down

0 comments on commit 1ff65a4

Please sign in to comment.