Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

Commit 0103459

Browse files
committedJul 25, 2020
Merge branch 'issue-17' of github.com:topcoder-platform/u-bahn-app into issue-17
2 parents 8ff883f + a1c21cc commit 0103459

File tree

3 files changed

+23
-6
lines changed

3 files changed

+23
-6
lines changed
 

‎client/src/components/AddToGroupModal/index.jsx

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,12 @@ export default function AddToGroupModal({ onCancel, updateUser, user }) {
193193
/>
194194
))}
195195
</div>
196+
{myGroups.filter((g) =>
197+
g.name.toLowerCase().includes(filter.toLowerCase())
198+
).length === 0 &&
199+
!loadingGroups && (
200+
<div className={style.message}>No results found</div>
201+
)}
196202
<h3 className={style.subTitle}>
197203
Other Groups{loadingGroups && " (Loading...)"}
198204
</h3>
@@ -211,11 +217,13 @@ export default function AddToGroupModal({ onCancel, updateUser, user }) {
211217
/>
212218
))}
213219
</div>
220+
{otherGroups.filter((g) =>
221+
g.name.toLowerCase().includes(filter.toLowerCase())
222+
).length === 0 &&
223+
!loadingGroups && (
224+
<div className={style.message}>No results found</div>
225+
)}
214226
</div>
215-
{otherGroups.filter((g) =>
216-
g.name.toLowerCase().includes(filter.toLowerCase())
217-
).length === 0 &&
218-
!loadingGroups && <div className={style.message}>No results found</div>}
219227
<div className={style.buttons}>
220228
<Button onClick={onCancel} disabled={updatingGroups || creatingGroup}>
221229
Cancel

‎client/src/components/AddToGroupModal/style.module.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,4 +90,5 @@
9090
.message {
9191
color: $textColor2;
9292
font: 400 12pt/1.25 Inter;
93+
margin-left: 30px;
9394
}

‎client/src/components/GroupsSideMenu/filters.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,13 @@ GroupTabFilters.propTypes = {
118118
onCreateNewGroup: PT.func,
119119
};
120120

121-
function GroupsSection({ title, items, onItemClicked, selectedItemId, loadingGroups }) {
121+
function GroupsSection({
122+
title,
123+
items,
124+
onItemClicked,
125+
selectedItemId,
126+
loadingGroups,
127+
}) {
122128
return (
123129
<>
124130
<div className={styles.sectionTitle}>{title}</div>
@@ -137,7 +143,9 @@ function GroupsSection({ title, items, onItemClicked, selectedItemId, loadingGro
137143
);
138144
})}
139145
</div>
140-
{items.length === 0 && !loadingGroups && <div className={styles.message}>No results found</div>}
146+
{items.length === 0 && !loadingGroups && (
147+
<div className={styles.message}>No results found</div>
148+
)}
141149
</>
142150
);
143151
}

0 commit comments

Comments
 (0)
This repository has been archived.