mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-11-11 16:09:31 +03:00
chat-fe: filter empty groups in sidebar
Empty groups caused the padding on the first group to be too large. Filter the groups before we map over them so that we can set padding properly. Fixes #2674
This commit is contained in:
parent
c570def06a
commit
6586aa98e3
@ -58,6 +58,7 @@ export class Sidebar extends Component {
|
||||
});
|
||||
|
||||
let groupedItems = Object.keys(associations)
|
||||
.filter((each) => (groupedChannels[each] || []).length !== 0)
|
||||
.filter((each) => {
|
||||
if (selectedGroups.length === 0) {
|
||||
return true;
|
||||
@ -67,7 +68,6 @@ export class Sidebar extends Component {
|
||||
})
|
||||
.map((each, i) => {
|
||||
let channels = groupedChannels[each] || [];
|
||||
if (channels.length === 0) return;
|
||||
return(
|
||||
<GroupItem
|
||||
key={i}
|
||||
|
Loading…
Reference in New Issue
Block a user