Add Storage component to homepage
This commit is contained in:
parent
93b4f2de62
commit
d37bd54725
|
@ -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 )
|
||||
|
|
Loading…
Reference in New Issue