Skip to content

Commit 6d9ee3e

Browse files
authored
chore: UI (#114)
1 parent 30bbe85 commit 6d9ee3e

File tree

2 files changed

+25
-15
lines changed

2 files changed

+25
-15
lines changed

frontend/src/components/Dashboard.tsx

Lines changed: 24 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -76,22 +76,32 @@ const Dashboard: FC = () => {
7676
</tr>
7777
</thead>
7878
<tbody>
79-
{data.map((user: UserDto) => (
80-
<tr key={user.id}>
81-
<td>{user.id}</td>
82-
<td>{user.name}</td>
83-
<td>{user.email}</td>
84-
<td className="text-center">
85-
<Button
86-
variant="secondary"
87-
size="sm"
88-
onClick={() => setSelectedUser(user)}
89-
>
90-
View Details
91-
</Button>
79+
{data.length === 0 ? (
80+
<tr>
81+
<td colSpan={4} className="text-center py-3">
82+
<div className="spinner-border text-primary" role="status">
83+
<span className="visually-hidden">Loading...</span>
84+
</div>
9285
</td>
9386
</tr>
94-
))}
87+
) : (
88+
data.map((user: UserDto) => (
89+
<tr key={user.id}>
90+
<td>{user.id}</td>
91+
<td>{user.name}</td>
92+
<td>{user.email}</td>
93+
<td className="text-center">
94+
<Button
95+
variant="secondary"
96+
size="sm"
97+
onClick={() => setSelectedUser(user)}
98+
>
99+
View Details
100+
</Button>
101+
</td>
102+
</tr>
103+
))
104+
)}
95105
</tbody>
96106
</Table>
97107
<ModalComponent

frontend/src/components/Layout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ type Props = {
1010
const Layout: FC<Props> = ({ children }) => {
1111
return (
1212
<div className="d-flex flex-column min-vh-100">
13-
<Header title={'QuickStart AWS'}>
13+
<Header title={'QuickStart AWS Containers'}>
1414
{' '}
1515
<Link to="/">
1616
<Button variant="light" size="lg">

0 commit comments

Comments
 (0)