Skip to content

Commit

Permalink
Make API call more readable
Browse files Browse the repository at this point in the history
  • Loading branch information
Justin Campbell committed Oct 19, 2020
1 parent da95549 commit 8144304
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/ItemTable/ItemTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ export default function ItemTable({ setActiveItem, setSidebarOpen }) {
const [data, setData] = useState([])

useEffect(() => {
fetch("/api/ce").then(res => res.json()).then(queue => {
setData(queue.items)
})
fetch("/api/ce")
.then(res => res.json())
.then(queue => setData(queue))
}, [])

const options = {
Expand Down

0 comments on commit 8144304

Please sign in to comment.