diff --git a/src/pages/bundles.tsx b/src/pages/bundles.tsx index a623f30..0c05a1d 100644 --- a/src/pages/bundles.tsx +++ b/src/pages/bundles.tsx @@ -102,15 +102,14 @@ function AccordionSection(props: AccordionSectionProps): JSX.Element { } function BundleAccordion(props: BundleAccordionProps): JSX.Element { - const isDesktop = useMediaQuery("(min-width: 768px)"); const { bundle, bundleStatus } = props.bundleWithStatus; - const bundleCompleted = BundleCompleted(props.bundleWithStatus); const totalItems = bundle.items.length; const requiredItems = bundle.itemsRequired === -1 ? totalItems : bundle.itemsRequired; const completedItems = bundleStatus.filter(Boolean).length; const remainingCount = requiredItems - completedItems; + const bundleCompleted = completedItems >= requiredItems; const bundleName = props.bundleWithStatus.bundle.localizedName; @@ -140,7 +139,7 @@ function BundleAccordion(props: BundleAccordionProps): JSX.Element { @@ -181,11 +180,18 @@ function BundleAccordion(props: BundleAccordionProps): JSX.Element { )} - + {!bundleCompleted && ( +
+ + + {remainingCount} / {requiredItems} + +
+ )} @@ -446,7 +452,6 @@ export default function Bundles() { // See note in bundlesheet.tsx // @ts-ignore await patchPlayer(patch); - setBundles(GetActiveBundles(activePlayer)); } }