Skip to content

Commit

Permalink
bugfixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Esummins committed May 23, 2024
1 parent 3e0f5e8 commit 54d020d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/components/ui/progress.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ const Progress = React.forwardRef<
/>
</ProgressPrimitive.Root>
<span className="flex text-sm">
{value && max ? `${value} / ${max}` : ``}
{typeof value === "number" && typeof max === "number"
? `${value} / ${max}`
: ``}
</span>
</div>
));
Expand Down
5 changes: 4 additions & 1 deletion src/pages/bundles.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ import { useMediaQuery } from "@react-hook/media-query";
import { IconSettings } from "@tabler/icons-react";
import clsx from "clsx";
import { useEffect, useState } from "react";
import { isNumber } from "util";

export const ItemQualityToString = {
"0": "Normal",
Expand Down Expand Up @@ -84,8 +85,10 @@ const CommunityCenterRooms: CommunityCenterRoomName[] = [
];

function AccordionSection(props: AccordionSectionProps): JSX.Element {
const { activePlayer } = usePlayers();
let progressIndicator =
props.completedCount &&
activePlayer &&
typeof props.completedCount === "number" &&
Array.isArray(props.children) &&
props.completedCount < props.children.length ? (
<Progress
Expand Down

0 comments on commit 54d020d

Please sign in to comment.