Skip to content

Commit 8ed9f47

Browse files
committed
Replaced the skeleton loader with a message that no guilds are available.
1 parent 9219a1f commit 8ed9f47

File tree

3 files changed

+16
-6
lines changed

3 files changed

+16
-6
lines changed

web-ui/src/components/guild-results/GuildResults.jsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ import React, { useContext, useState } from 'react';
33
import GroupIcon from '@mui/icons-material/Group';
44
import { Button, TextField } from '@mui/material';
55
import { styled } from '@mui/material/styles';
6+
import Typography from '@mui/material/Typography';
67

78
import { createGuild, getGuildLeaders } from '../../api/guild';
89
import { ADD_GUILD } from '../../context/actions';
910
import { AppContext } from '../../context/AppContext';
1011
import AddGuildModal from './EditGuildModal';
1112
import GuildSummaryCard from './GuildSummaryCard';
12-
import SkeletonLoader from '../skeleton_loader/SkeletonLoader';
1313
import { useQueryParameters } from '../../helpers/query-parameters';
1414
import './GuildResults.css';
1515

@@ -125,9 +125,7 @@ const GuildResults = () => {
125125
/>
126126
) : null
127127
)
128-
: Array.from({ length: 20 }).map((_, index) => (
129-
<SkeletonLoader key={index} type="guild" />
130-
))}
128+
: <Typography variant="h5">None Available</Typography>}
131129
</div>
132130
</Root>
133131
);

web-ui/src/components/guild-results/__snapshots__/GuildResults.test.jsx.snap

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,13 @@ exports[`renders correctly when no guilds are loaded 1`] = `
352352
</div>
353353
<div
354354
class="guilds"
355-
/>
355+
>
356+
<h5
357+
class="MuiTypography-root MuiTypography-h5 css-ag7rrr-MuiTypography-root"
358+
>
359+
None Available
360+
</h5>
361+
</div>
356362
</div>
357363
</div>
358364
`;

web-ui/src/pages/__snapshots__/GuildsPage.test.jsx.snap

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,13 @@ exports[`renders correctly 1`] = `
5353
</div>
5454
<div
5555
class="guilds"
56-
/>
56+
>
57+
<h5
58+
class="MuiTypography-root MuiTypography-h5 css-ag7rrr-MuiTypography-root"
59+
>
60+
None Available
61+
</h5>
62+
</div>
5763
</div>
5864
</div>
5965
</div>

0 commit comments

Comments
 (0)