Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 24 additions & 14 deletions frontend/src/components/Dashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,22 +76,32 @@ const Dashboard: FC = () => {
</tr>
</thead>
<tbody>
{data.map((user: UserDto) => (
<tr key={user.id}>
<td>{user.id}</td>
<td>{user.name}</td>
<td>{user.email}</td>
<td className="text-center">
<Button
variant="secondary"
size="sm"
onClick={() => setSelectedUser(user)}
>
View Details
</Button>
{data.length === 0 ? (
<tr>
<td colSpan={4} className="text-center py-3">
<div className="spinner-border text-primary" role="status">
<span className="visually-hidden">Loading...</span>
</div>
</td>
</tr>
))}
) : (
data.map((user: UserDto) => (
<tr key={user.id}>
<td>{user.id}</td>
<td>{user.name}</td>
<td>{user.email}</td>
<td className="text-center">
<Button
variant="secondary"
size="sm"
onClick={() => setSelectedUser(user)}
>
View Details
</Button>
</td>
</tr>
))
)}
</tbody>
</Table>
<ModalComponent
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/Layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ type Props = {
const Layout: FC<Props> = ({ children }) => {
return (
<div className="d-flex flex-column min-vh-100">
<Header title={'QuickStart AWS'}>
<Header title={'QuickStart AWS Containers'}>
{' '}
<Link to="/">
<Button variant="light" size="lg">
Expand Down
Loading