fix: pass activeIds to DisciplineCard in ElementalSubtab; add missing mana type names
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m29s
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m29s
This commit is contained in:
@@ -120,6 +120,7 @@ export const DisciplinesTab: React.FC = () => {
|
||||
{activeAttunement === 'elemental' ? (
|
||||
<ElementalSubtab
|
||||
disciplines={disciplines}
|
||||
activeIds={activeIds}
|
||||
concurrentLimit={concurrentLimit}
|
||||
elements={elements}
|
||||
onToggle={handleToggle}
|
||||
|
||||
@@ -50,6 +50,7 @@ function buildElementalDisciplineMap(
|
||||
|
||||
interface SharedRenderProps {
|
||||
disciplines: Record<string, { xp: number; paused: boolean }>;
|
||||
activeIds: string[];
|
||||
concurrentLimit: number;
|
||||
elements: DisciplineCardProps['missingSourceMana'] extends readonly string[]
|
||||
? Record<string, { unlocked: boolean }>
|
||||
@@ -65,8 +66,8 @@ interface GroupProps extends SharedRenderProps {
|
||||
conversion?: DisciplineDefinition;
|
||||
}
|
||||
|
||||
const ElementalDisciplineGroup: React.FC<GroupProps> = ({
|
||||
manaType, capacity, conversion, disciplines, concurrentLimit, elements, onToggle,
|
||||
const ElementalDisciplineGroup: React.FC<GroupProps & { activeIds: string[] }> = ({
|
||||
manaType, capacity, conversion, disciplines, activeIds, concurrentLimit, elements, onToggle,
|
||||
}) => {
|
||||
const elementDef = ELEMENTS[manaType];
|
||||
const manaColor = elementDef?.color ?? '#888888';
|
||||
@@ -95,6 +96,7 @@ const ElementalDisciplineGroup: React.FC<GroupProps> = ({
|
||||
definition={def}
|
||||
xp={discState.xp}
|
||||
paused={discState.paused}
|
||||
activeIds={activeIds}
|
||||
concurrentLimit={concurrentLimit}
|
||||
isLocked={!prereqCheck.canProceed}
|
||||
missingPrereqs={prereqCheck.missingPrereqs}
|
||||
@@ -117,7 +119,7 @@ const ElementalDisciplineGroup: React.FC<GroupProps> = ({
|
||||
interface ElementalSubtabProps extends SharedRenderProps {}
|
||||
|
||||
export const ElementalSubtab: React.FC<ElementalSubtabProps> = ({
|
||||
disciplines, concurrentLimit, elements, onToggle,
|
||||
disciplines, activeIds, concurrentLimit, elements, onToggle,
|
||||
}) => {
|
||||
const disciplineMap = useMemo(
|
||||
() => buildElementalDisciplineMap(
|
||||
@@ -151,6 +153,7 @@ export const ElementalSubtab: React.FC<ElementalSubtabProps> = ({
|
||||
capacity={entry.capacity}
|
||||
conversion={entry.conversion}
|
||||
disciplines={disciplines}
|
||||
activeIds={activeIds}
|
||||
concurrentLimit={concurrentLimit}
|
||||
elements={elements}
|
||||
onToggle={onToggle}
|
||||
|
||||
Reference in New Issue
Block a user