Archived
list rendering
This commit is contained in:
1 parent
bed77f0c03
commit
294ebcca92
2 files changed
+6
-4
No files matched your search
@@ -4,7 +4,7 @@
|
|||||||
"description": "",
|
"description": "",
|
||||||
"main": "app.js",
|
"main": "app.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "nodemon app.js",
|
"start": "nodemon index.js",
|
||||||
"test": "echo \"Error: no test specified\" && exit 1"
|
"test": "echo \"Error: no test specified\" && exit 1"
|
||||||
},
|
},
|
||||||
"author": "",
|
"author": "",
|
||||||
|
|||||||
@@ -2,13 +2,15 @@ import { Stack } from "react-bootstrap";
|
|||||||
import styles from "./index.module.scss";
|
import styles from "./index.module.scss";
|
||||||
|
|
||||||
export const Home = () => {
|
export const Home = () => {
|
||||||
|
const data =[{"name":"test1"},{"name":"test2"}];
|
||||||
return (
|
return (
|
||||||
<div className={styles.con}>
|
<div className={styles.con}>
|
||||||
{" "}
|
{" "}
|
||||||
<Stack gap={1}>
|
<Stack gap={1}>
|
||||||
<div className={styles.item}>First item</div>
|
{data.map(function(d, idx){
|
||||||
<div className={styles.item}>Second item</div>
|
return (<div key={idx} className={styles.item}>{d.name}</div>)
|
||||||
<div className={styles.item}>Third item</div>
|
})}
|
||||||
|
|
||||||
</Stack>
|
</Stack>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in new issue
Block a user