Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Donald Haase
rpg-workshop
Commits
6a5ab49e
Commit
6a5ab49e
authored
Oct 16, 2021
by
Joe Ziemba
Browse files
fix feats
parent
457c3607
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
src/components/pfcb/FeatEntry.js
View file @
6a5ab49e
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
)
}
...
...
src/components/pfcb/FeatSelection.js
View file @
6a5ab49e
...
...
@@ -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
.
l
evel
featL
evel
)
// Additionally filter by query if present
...
...
@@ -88,7 +89,7 @@ export const FeatSelection = ({
featType
,
filterFeatsByQuery
,
getFeatTag
,
character
.
l
evel
,
featL
evel
,
])
return
(
...
...
src/components/pfcb/FeatsSection.js
View file @
6a5ab49e
...
...
@@ -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
>
...
...
src/data/feats/allFeats.json
View file @
6a5ab49e
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment