Initial frontend draft
This commit is contained in:
parent
1606d1faf0
commit
b6293beeec
21 changed files with 4105 additions and 150 deletions
30
frontend/app/routes/Item.tsx
Normal file
30
frontend/app/routes/Item.tsx
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
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;
|
||||
Loading…
Add table
Add a link
Reference in a new issue