diff --git a/src/components/form/formCreateItem.jsx b/src/components/form/formCreateItem.jsx
new file mode 100644
index 0000000..c9bd3f6
--- /dev/null
+++ b/src/components/form/formCreateItem.jsx
@@ -0,0 +1,78 @@
+import React, { useState, useEffect } from "react";
+import { Form, Input, InputNumber, Button, Select } from "antd";
+import axios from "axios";
+
+const { TextArea } = Input;
+const { Option } = Select;
+
+export const FormCreateItem = () => {
+ const [form] = Form.useForm();
+ const [rooms, setRooms] = useState([]);
+
+ useEffect(() => {
+ const fetchRooms = async () => {
+ try {
+ const response = await axios.get(
+ `${import.meta.env.VITE_API_URL}/room`,
+ );
+ setRooms(response.data);
+ } catch (error) {
+ console.error(error);
+ }
+ };
+
+ fetchRooms();
+ }, []);
+
+ const onFinish = async (values) => {
+ try {
+ const response = await axios.post(
+ `${import.meta.env.VITE_API_URL}/item`,
+ values,
+ );
+ console.log(response.data);
+ } catch (error) {
+ console.error(error);
+ }
+ };
+
+ return (
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ );
+};
+
+export default FormCreateItem;
diff --git a/src/components/form/formCreateRoom.jsx b/src/components/form/formCreateRoom.jsx
new file mode 100644
index 0000000..a9b6c19
--- /dev/null
+++ b/src/components/form/formCreateRoom.jsx
@@ -0,0 +1,38 @@
+import React from "react";
+import { Form, Input, Button } from "antd";
+import axios from "axios";
+
+export const FormCreateRoom = () => {
+ const [form] = Form.useForm();
+
+ const onFinish = async (values) => {
+ try {
+ const response = await axios.post(
+ `${import.meta.env.VITE_API_URL}/room`,
+ values,
+ );
+ console.log(response.data);
+ } catch (error) {
+ console.error(error);
+ }
+ };
+
+ return (
+
+
+
+
+
+
+
+ );
+};
+
+export default FormCreateRoom;
diff --git a/src/pages/home.jsx b/src/pages/home.jsx
index 70d55a6..7277e04 100644
--- a/src/pages/home.jsx
+++ b/src/pages/home.jsx
@@ -3,6 +3,8 @@ import React from "react";
import { useAuth } from "../hooks";
import { ItemBox } from "../components/item/item";
import { DatePicker } from "antd";
+import { FormCreateItem } from "../components/form/formCreateItem";
+import { FormCreateRoom } from "../components/form/formCreateRoom";
export const Home = () => {
const { user } = useAuth();
@@ -10,6 +12,8 @@ export const Home = () => {
return (
Home page
+
+
{user && Hello {user.user.username}
}