|
@@ -12,35 +12,40 @@ import {QueueRow} from "./QueueRow";
|
|
|
*/
|
|
|
const TableRows = ({rows = []}) => {
|
|
|
return (
|
|
|
- <table>
|
|
|
- <thead className="bg-gray-200 border-b">
|
|
|
- <tr>
|
|
|
- <th scope="col" className="text-sm font-medium text-gray-900 px-6 py-4 text-left">
|
|
|
- #
|
|
|
- </th>
|
|
|
- <th scope="col" className="text-sm font-medium text-gray-900 px-6 py-4 text-left">
|
|
|
- Nom
|
|
|
- </th>
|
|
|
- <th scope="col" className="text-sm font-medium text-gray-900 px-6 py-4 text-left">
|
|
|
- ARN
|
|
|
- </th>
|
|
|
- <th scope="col" className="text-sm font-medium text-gray-900 px-6 py-4 text-left">
|
|
|
- Messages
|
|
|
- </th>
|
|
|
- </tr>
|
|
|
- </thead>
|
|
|
- <tbody>
|
|
|
- {rows.map((row, index) => {
|
|
|
- return <QueueRow key={index}
|
|
|
- index={index + 1}
|
|
|
- arn={row.props.arn}
|
|
|
- itemCount={row.props.itemCount}
|
|
|
- qName={row.props.qName}
|
|
|
- url={row.props.url}/>
|
|
|
- })}
|
|
|
- </tbody>
|
|
|
- <React.StrictMode/>
|
|
|
- </table>
|
|
|
+ <>
|
|
|
+ {rows == [] ? <p>Empty</p> : (
|
|
|
+ <table className="min-w-full">
|
|
|
+ <thead className="bg-gray-200 border-b">
|
|
|
+ <tr>
|
|
|
+ <th scope="col" className="text-sm font-medium text-gray-900 px-6 py-4 text-left">
|
|
|
+ #
|
|
|
+ </th>
|
|
|
+ <th scope="col" className="text-sm font-medium text-gray-900 px-6 py-4 text-left">
|
|
|
+ Nom
|
|
|
+ </th>
|
|
|
+ <th scope="col" className="text-sm font-medium text-gray-900 px-6 py-4 text-left">
|
|
|
+ ARN
|
|
|
+ </th>
|
|
|
+ <th scope="col" className="text-sm font-medium text-gray-900 px-6 py-4 text-left">
|
|
|
+ Messages
|
|
|
+ </th>
|
|
|
+ <th></th>
|
|
|
+ </tr>
|
|
|
+ </thead>
|
|
|
+ <tbody>
|
|
|
+ {rows.map((row, index) => {
|
|
|
+ return <QueueRow key={index}
|
|
|
+ index={index + 1}
|
|
|
+ arn={row.props.arn}
|
|
|
+ itemCount={row.props.itemCount}
|
|
|
+ qName={row.props.qName}
|
|
|
+ url={row.props.url}/>
|
|
|
+ })}
|
|
|
+ </tbody>
|
|
|
+ <React.StrictMode/>
|
|
|
+ </table>
|
|
|
+ )}
|
|
|
+ </>
|
|
|
);
|
|
|
}
|
|
|
|