tracking-code-which-will-go-to-the-HEAD FLAMEAL Documentation client/src/pages/MyInventory/MyInventory.js

Source

client/src/pages/MyInventory/MyInventory.js

import React, { useContext } from "react";
import ListFill from "../../components/List/ListFill";
import { UserContext } from "../../context/UserContext";
import "./MyInventory.css";

/**
 * The component to be displayed in the MyInventory page
 * @category MyInventory
 * @component
 * @borrows {@link ListFill} as a child component to handle the list of items
 * @returns {ReactComponent} the MyInventory component
 */
const MyInventory = () => {
  //get the user context
  const [state] = useContext(UserContext);
  //console.log(state);

  //pass te user context to the session storage
  sessionStorage.setItem("state", JSON.stringify(state));
  return (
    <div className="list-containter">
      <div className="list-app-inv">
        <h1>Add goods to the inventory</h1>
        <ListFill />
      </div>
    </div>
  );
};
export default MyInventory;