File tree Expand file tree Collapse file tree 2 files changed +25
-15
lines changed Expand file tree Collapse file tree 2 files changed +25
-15
lines changed Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ type Props = {
1010const 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" >
You can’t perform that action at this time.
0 commit comments