From a48b4d3027f2fae990b78246307f95d82f8bb353 Mon Sep 17 00:00:00 2001 From: Leon Xu Date: Mon, 2 May 2022 21:09:11 -0700 Subject: [PATCH] doc: add data to Table component --- src/Table.js | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/Table.js b/src/Table.js index 8f2bcf8..e8e8e2d 100644 --- a/src/Table.js +++ b/src/Table.js @@ -1,8 +1,19 @@ import React from "react"; import "./Table.css"; -function Table() { - return
; +function Table({ countries }) { + return ( +
+ {countries.map(({ country, cases }) => ( + + {country} + + {cases} + + + ))} +
+ ); } export default Table; \ No newline at end of file