Skip to content

Commit

Permalink
don't display loading in user search when there are partial results t…
Browse files Browse the repository at this point in the history
…o show
  • Loading branch information
mipyykko committed Apr 12, 2023
1 parent 7aff924 commit df2a56e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion frontend/components/Dashboard/Users/MobileGrid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ const MobileGrid: React.FC = () => {
const RenderCards: React.FC = () => {
const { data, loading } = useContext(UserSearchContext)

if (loading) {
if (loading && data.length < 1) {
return (
<>
{range(5).map((n) => (
Expand Down
2 changes: 1 addition & 1 deletion frontend/components/Dashboard/Users/WideGrid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ const RenderResults = () => {
const isVeryWide = useMediaQuery("(min-width: 1200px)")
const colSpan = 5 + (isVeryWide ? 1 : 0)

if (loading) {
if (loading && data.length < 1) {
return (
<TableBody>
{range(5).map((n) => (
Expand Down

0 comments on commit df2a56e

Please sign in to comment.