diff --git a/src/pages/Home.js b/src/pages/Home.js index d99b1fb..327faa2 100644 --- a/src/pages/Home.js +++ b/src/pages/Home.js @@ -3,11 +3,14 @@ import Col from 'react-bootstrap/Col'; import Container from "react-bootstrap/Container"; import Card from "react-bootstrap/Card"; -import { useState, useEffect } from "react" +import { useState, useEffect, useContext } from "react" +import { StorageContext } from '../contexts/StorageContext'; export function Home ( props ) { const [ books, setBooks ] = useState([]) + const Storage = useContext( StorageContext ) + useEffect( () => { setBooks( props.items ) console.log( props.items )