change default chip selections

This commit is contained in:
David Westgate 2025-03-09 16:04:20 -07:00
parent 648d815647
commit 32ce2f9169

View File

@ -14,6 +14,7 @@ import styles from "@/styles/styles";
import i18n from "@/i18n/i18n"; import i18n from "@/i18n/i18n";
const colors: ColorValue[] = ["white", "red", "green", "blue", "black"]; const colors: ColorValue[] = ["white", "red", "green", "blue", "black"];
const defaults = [100, 50, 50, 50, 50];
const ChipInputModal = ({ const ChipInputModal = ({
showModal, showModal,
@ -152,7 +153,7 @@ const ChipsSelector = ({
} else if (numberOfChips > totalChipsCount.length) { } else if (numberOfChips > totalChipsCount.length) {
for (let colorIndex = 0; colorIndex < numberOfChips; ++colorIndex) { for (let colorIndex = 0; colorIndex < numberOfChips; ++colorIndex) {
if (colorIndex >= newTotalChipsCount.length) { if (colorIndex >= newTotalChipsCount.length) {
const defaultTotal = 100 - colorIndex * 20; const defaultTotal = defaults[colorIndex];
newTotalChipsCount.push(defaultTotal); newTotalChipsCount.push(defaultTotal);
} }
} }