mirror of
https://github.com/roleypoly/roleypoly.git
synced 2025-06-16 01:29:09 +00:00
fix(RolePicker): prevent render of hidden categories
This commit is contained in:
parent
95dad8effa
commit
b7f82593df
1 changed files with 31 additions and 28 deletions
|
@ -82,8 +82,12 @@ export const RolePicker = (props: RolePickerProps) => {
|
||||||
{props.guildData.categories.length !== 0 ? (
|
{props.guildData.categories.length !== 0 ? (
|
||||||
<>
|
<>
|
||||||
<div>
|
<div>
|
||||||
{sortBy(props.guildData.categories, 'position').map(
|
{sortBy(
|
||||||
(category, idx) => (
|
props.guildData.categories.filter(
|
||||||
|
(category) => !category.hidden
|
||||||
|
),
|
||||||
|
'position'
|
||||||
|
).map((category, idx) => (
|
||||||
<CategoryContainer key={idx}>
|
<CategoryContainer key={idx}>
|
||||||
<PickerCategory
|
<PickerCategory
|
||||||
key={idx}
|
key={idx}
|
||||||
|
@ -108,8 +112,7 @@ export const RolePicker = (props: RolePickerProps) => {
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
</CategoryContainer>
|
</CategoryContainer>
|
||||||
)
|
))}
|
||||||
)}
|
|
||||||
</div>
|
</div>
|
||||||
<FaderOpacity
|
<FaderOpacity
|
||||||
isVisible={xor(selectedRoles, props.member.roles).length !== 0}
|
isVisible={xor(selectedRoles, props.member.roles).length !== 0}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue