Commit 6a5ab49e authored by Joe Ziemba's avatar Joe Ziemba
Browse files

fix feats

parent 457c3607
import React from "react"
const FeatEntry = ({ addFeat, feat, deleteFeat }) => {
const add = () => addFeat(feat.type)
const add = () => addFeat(feat.type, feat.level)
const remove = () => {
deleteFeat(feat)
}
......
......@@ -5,6 +5,7 @@ import { Modal } from "components"
export const FeatSelection = ({
featType,
featLevel,
character,
selectFeat,
show,
......@@ -72,7 +73,7 @@ export const FeatSelection = ({
filteredFeats = filterFeatsBy(
filteredFeats,
getFeatTag(type),
character.level
featLevel
)
// Additionally filter by query if present
......@@ -88,7 +89,7 @@ export const FeatSelection = ({
featType,
filterFeatsByQuery,
getFeatTag,
character.level,
featLevel,
])
return (
......
......@@ -13,9 +13,11 @@ export const FeatsSection = () => {
)
const [showFeatSelection, setShowFeatSelection] = useState(false)
const [featType, setfeatType] = useState("")
const [featLevel, setfeatLevel] = useState("")
const openFeatSelection = (featType) => {
const openFeatSelection = (featType, featLevel) => {
setfeatType(featType)
setfeatLevel(featLevel)
setShowFeatSelection(true)
}
......@@ -114,6 +116,7 @@ export const FeatsSection = () => {
closeFunction={() => setShowFeatSelection(false)}
selectFeat={localSelectFeat}
featType={featType}
featLevel={featLevel}
character={character}
/>
</Card>
......
This diff is collapsed.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment