Grabbed dndbeyond's source code
``` ~/go/bin/sourcemapper -output ddb -jsurl https://media.dndbeyond.com/character-app/static/js/main.90aa78c5.js ```
This commit is contained in:
@@ -0,0 +1,51 @@
|
||||
import { useSelector } from "react-redux";
|
||||
|
||||
import {
|
||||
ClassUtils,
|
||||
rulesEngineSelectors,
|
||||
} from "@dndbeyond/character-rules-engine/es";
|
||||
|
||||
import SpellSlotManager from "../../../../CharacterSheet/containers/SpellSlotManager";
|
||||
import ClassSpellManager from "../../../components/ClassSpellManager";
|
||||
|
||||
export default function SpellManagePane() {
|
||||
const classSpellLists = useSelector(rulesEngineSelectors.getClassSpellLists);
|
||||
const entityValueLookup = useSelector(
|
||||
rulesEngineSelectors.getCharacterValueLookupByEntity
|
||||
);
|
||||
const dataOriginRefData = useSelector(
|
||||
rulesEngineSelectors.getDataOriginRefData
|
||||
);
|
||||
const proficiencyBonus = useSelector(
|
||||
rulesEngineSelectors.getProficiencyBonus
|
||||
);
|
||||
const theme = useSelector(rulesEngineSelectors.getCharacterTheme);
|
||||
|
||||
if (!classSpellLists.length) {
|
||||
return (
|
||||
<div className="ct-spell-manage-pane__default">
|
||||
You do not have spellcasting or pact magic spells to manage. The spells
|
||||
that appear for your character were gained through other class features,
|
||||
species traits, feats, or items.
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="ct-spell-manage-pane">
|
||||
<SpellSlotManager />
|
||||
{classSpellLists.map((classSpellList) => (
|
||||
<ClassSpellManager
|
||||
{...classSpellList}
|
||||
key={ClassUtils.getMappingId(classSpellList.charClass)}
|
||||
hasMultipleSpellClasses={classSpellLists.length > 1}
|
||||
entityValueLookup={entityValueLookup}
|
||||
dataOriginRefData={dataOriginRefData}
|
||||
isPrepareMaxed={!!classSpellList.isPrepareMaxed}
|
||||
proficiencyBonus={proficiencyBonus}
|
||||
theme={theme}
|
||||
/>
|
||||
))}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
import SpellManagePane from "./SpellManagePane";
|
||||
|
||||
export default SpellManagePane;
|
||||
export { SpellManagePane };
|
||||
Reference in New Issue
Block a user