Skip to content

Commit

Permalink
reviewed
Browse files Browse the repository at this point in the history
  • Loading branch information
Luxshan2000 committed Sep 28, 2023
1 parent a51b6b7 commit 3daa128
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
2 changes: 1 addition & 1 deletion backend/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const cors = require("cors")
const bodyParser = require("body-parser")


// const connectMongoDb = require("./config/database")
const connectMongoDb = require("./config/database")
// const addRoutes = require('./src/routes/addRoutes');
// const getRoutes = require('./src/routes/getRoutes');

Expand Down
3 changes: 2 additions & 1 deletion frontend/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ function App() {
<p>By using Github actions and docker in AWS EC2 instance Ubuntu</p>
<hr/>
<hr/>
<SeeItems />

<AddItems />
<SeeItems />
</div>
);
}
Expand Down
14 changes: 12 additions & 2 deletions frontend/src/components/SeeItems.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,24 @@
import React, { useState } from 'react'
import React, { useEffect, useState } from 'react'


const dummy = ["Apple", "Orange", "Car"]


function SeeItems() {
const [items, setItems] = useState([])

useEffect(()=>{
setItems(dummy)
})

if(!items){
return <h1>Loading.....</h1>
}
return (
<div>

{items.map((item)=>(
<h6>{item}</h6>
))}
</div>
)
}
Expand Down

0 comments on commit 3daa128

Please sign in to comment.