diff --git a/src/hooks/useApi.js b/src/hooks/useApi.js
new file mode 100644
index 0000000..8566d58
--- /dev/null
+++ b/src/hooks/useApi.js
@@ -0,0 +1,21 @@
+import axios from "axios";
+import { useState } from "react";
+
+const useApi = () => {
+ const [data, setData] = useState();
+
+ const getFromApi = async (url) => {
+ await axios
+ .get(`${process.env.REACT_APP_API_URL}/${url}`)
+ .then((response) => {
+ return setData(response.data);
+ })
+ .catch((error) => {
+ console.error("Error :", error);
+ });
+ };
+
+ return { getFromApi, data };
+};
+
+export default useApi;
diff --git a/src/pages/Dev/index.js b/src/pages/Dev/index.js
new file mode 100644
index 0000000..13b5b1c
--- /dev/null
+++ b/src/pages/Dev/index.js
@@ -0,0 +1,196 @@
+import "./style.css";
+
+import axios from "axios";
+import { useEffect, useState } from "react";
+
+import Container from "../../layouts/Container";
+import jutsus from "../../data/jutsuData";
+
+const Dev = () => {
+ const [data, setData] = useState();
+ const [_foundryId, setFoundryId] = useState();
+ const [name, setName] = useState();
+ const [img, setImg] = useState();
+ const [level, setLvl] = useState();
+ const [element, setElem] = useState();
+ const [description, setDesc] = useState();
+ const [duration, setDuration] = useState();
+ const [range, setRange] = useState();
+ const [uses, setUses] = useState();
+ const [chakraCost, setChakraCost] = useState();
+ const [actionType, setActionType] = useState();
+ const [criticalThreshold, setCritical] = useState();
+ const [damages, setDamages] = useState();
+ const [scaleFormula, setScaleFormula] = useState();
+ const [statSave, setSave] = useState();
+ const [concentration, setConcentration] = useState();
+ const [scaling, setScaling] = useState();
+
+ useEffect(() => {
+ setFoundryId(data?.foundry_id);
+ setName(data?.name);
+ setImg(data?.img);
+ setLvl(data?.system ? data.system.level : data?.level);
+ setElem();
+ setDesc(data?.system ? data.system.description.value : data?.description);
+ setDuration(data?.duration);
+ setRange(data?.range);
+ setUses();
+ setChakraCost();
+ setActionType();
+ setCritical();
+ setDamages();
+ setScaleFormula();
+ setSave();
+ setConcentration();
+ setScaling();
+ }, [data]);
+
+ // uses: {
+ // amount: Number,
+ // max: Number,
+ // type: {
+ // type: mongoose.Schema.Types.ObjectId,
+ // ref: "restType",
+ // },
+ // },
+ // chakraCost: Number,
+ // actionType: {
+ // type: mongoose.Schema.Types.ObjectId,
+ // ref: "actionType",
+ // },
+ // criticalThreshold: String,
+ // damages: [String],
+ // scaleFormula: String,
+ // statSave: {
+ // targetAbility: {
+ // type: mongoose.Schema.Types.ObjectId,
+ // ref: "Ability",
+ // },
+ // sourceAbility: {
+ // type: mongoose.Schema.Types.ObjectId,
+ // ref: "Ability",
+ // },
+ // },
+ // concentration: Boolean,
+ // scaling: {
+ // available: Boolean,
+ // formula: String,
+ // },
+ // })
+ const handlePost = (data) => {
+ // You need to modify the JSON so it appears to be the same as the MOdel in DB
+
+ // const body = {
+ // _foundryId,
+ // name,
+ // img,
+ // level,
+ // element,
+ // description,
+ // duration : {units: duration.units, value: duration.value},
+ // range,
+ // uses,
+ // chakraCost,
+ // actionType,
+ // criticalThreshold,
+ // damages,
+ // scaleFormula,
+ // statSave,
+ // concentration,
+ // scaling,
+ // };
+
+ axios
+ .post("http://localhost:8080/jutsu/new", data)
+ .then((response) => {
+ console.log("Post successful", response.data);
+ })
+ .catch((error) => {
+ console.error("Error posting data:", error);
+ });
+ };
+
+ const handleSaveData = () => {
+ localStorage.setItem("jutsuData", JSON.stringify(data));
+ window.alert("data saved in locale storage");
+ };
+
+ return (
+ id : {data?.foundry_id}
+ Item Name
+
+
+ {
+ setLvl(e.target.value);
+ }}
+ />
+
{el.description}
+