import { useEffect, useState } from "react";
import { useParams } from "react-router";
import { FetchItem } from "~/Lib/Item";
import type Item from "~/Models/Item";

export const meta = () => {
  return [
    { title: "" },
  ];
};

const Item = () => {
  const params = useParams();
  const [item, setItem] = useState<Item>();

  useEffect(() => {
    const libraryId = params["libraryId"];
    const itemId = params["itemId"];

    FetchItem(itemId!, libraryId!).then(response => {
      setItem(response);
    })
  }, []);

  return (
    <></>
  );
};

export default Item;