Skip to content

Commit

Permalink
prettier.
Browse files Browse the repository at this point in the history
  • Loading branch information
phulin committed Aug 26, 2024
1 parent 28deb99 commit 03a018d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions client/src/sections/quests/level11/Desert.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ const DesertQuest = () => {

const explorationItems = $items`UV-resistant compass, ornate dowsing rod, survival knife`;
const explorationItemsToEquip = explorationItems.filter(
(item) => have(item) && !haveEquipped(item)
(item) => have(item) && !haveEquipped(item),
);

const needMoreExploration = currentExploration < possibleExploration;
Expand Down Expand Up @@ -191,7 +191,7 @@ const DesertQuest = () => {
explorationItemsToEquip.map((item) => (
<MainLink href={inventoryLink(item)}>{item.name}</MainLink>
)),
explorationItemsToEquip.map((item) => item.name)
explorationItemsToEquip.map((item) => item.name),
)}{" "}
to speed up exploration
{explorationItemsToEquip.includes($item`survival knife`) &&
Expand All @@ -210,7 +210,7 @@ const DesertQuest = () => {
Use your{" "}
{plural(
availableAmount($item`desert sightseeing pamphlet`),
"desert sightseeing pamphlet"
"desert sightseeing pamphlet",
)}{" "}
for +15% exploration each.
</Line>
Expand Down
6 changes: 3 additions & 3 deletions client/src/sections/quests/level11/Palindome.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const Level11Palindome: React.FC = () => {
const talismanEquipped = haveEquipped($item`Talisman o' Namsilat`);

const neededNcPhotos = ["a red nugget", "an ostrich egg", "god"].filter(
(item) => !have($item`photograph of ${item}`)
(item) => !have($item`photograph of ${item}`),
);
const needInstantCamera =
!have($item`photograph of a dog`) &&
Expand Down Expand Up @@ -77,8 +77,8 @@ const Level11Palindome: React.FC = () => {
Find {pluralJustDesc(neededNcPhotos.length, "photograph")} of a{" "}
{commaAnd(
["a red nugget", "an ostrich egg", "god"].filter(
(item) => !have($item`photograph of ${item}`)
)
(item) => !have($item`photograph of ${item}`),
),
)}{" "}
from non-combats.
</Line>
Expand Down
10 changes: 5 additions & 5 deletions client/src/util/text.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Fragment, ReactNode } from "react";
export function pluralJustDesc(
count: number,
description: string,
descriptionPlural?: string
descriptionPlural?: string,
) {
if (!descriptionPlural) descriptionPlural = `${description}s`;
return count === 1 ? description : descriptionPlural;
Expand All @@ -12,15 +12,15 @@ export function pluralJustDesc(
export function plural(
count: number,
description: string,
descriptionPlural?: string
descriptionPlural?: string,
) {
return `${count} ${pluralJustDesc(count, description, descriptionPlural)}`;
}

export function commaList(
values: string[] | ReactNode[],
connector: string,
keys?: string[] | number[]
keys?: string[] | number[],
): ReactNode {
// Show only truthy values.
values = values.filter((x) => x);
Expand Down Expand Up @@ -62,14 +62,14 @@ export function commaList(

export function commaAnd(
values: string[] | ReactNode[],
keys?: string[] | number[]
keys?: string[] | number[],
): ReactNode {
return commaList(values, "and", keys);
}

export function commaOr(
values: string[] | ReactNode[],
keys?: string[] | number[]
keys?: string[] | number[],
): ReactNode {
return commaList(values, "or", keys);
}
Expand Down

0 comments on commit 03a018d

Please sign in to comment.