diff --git a/src/components/EditarIcon.jsx b/src/components/EditarIcon.jsx
new file mode 100644
index 0000000..bb7ca52
--- /dev/null
+++ b/src/components/EditarIcon.jsx
@@ -0,0 +1,15 @@
+export default function EditarIcon() {
+ return (
+
+ );
+}
diff --git a/src/components/NuevaCoord.jsx b/src/components/NuevaCoord.jsx
index fd22fc2..21f2f14 100644
--- a/src/components/NuevaCoord.jsx
+++ b/src/components/NuevaCoord.jsx
@@ -1,6 +1,6 @@
import { useState } from "react";
-export default function NuevaCoord({coord, setcoord, colapsar, tipo}) {
+export default function NuevaCoord({ coord, setcoord, colapsar, tipo }) {
const [llevaY, setLlevaY] = useState(false);
const [x, setX] = useState("");
const [y, setY] = useState("");
@@ -13,43 +13,59 @@ export default function NuevaCoord({coord, setcoord, colapsar, tipo}) {
y: llevaY ? y : null,
z: z,
};
-
+
setcoord([...coord, newCoord]);
localStorage.setItem(tipo, JSON.stringify([...coord, newCoord]));
if (colapsar) colapsar();
};
-
+
return (
-
setLlevaY(e.target.checked)}
data-bs-toggle="collapse"
data-bs-target="#collapseY"
/>
-
+
-
-
+
+
);
}
diff --git a/src/components/RemoveIcon.jsx b/src/components/RemoveIcon.jsx
new file mode 100644
index 0000000..29d8f83
--- /dev/null
+++ b/src/components/RemoveIcon.jsx
@@ -0,0 +1,15 @@
+export default function RemoveIcon() {
+ return (
+
+ );
+}
diff --git a/src/components/ShareIcon.jsx b/src/components/ShareIcon.jsx
new file mode 100644
index 0000000..4d919a6
--- /dev/null
+++ b/src/components/ShareIcon.jsx
@@ -0,0 +1,15 @@
+export default function ShareIcon() {
+ return(
+ ,
+ );
+}
diff --git a/src/components/StaticModal.jsx b/src/components/StaticModal.jsx
new file mode 100644
index 0000000..5e77c7c
--- /dev/null
+++ b/src/components/StaticModal.jsx
@@ -0,0 +1,44 @@
+export default function Modal() {
+ return (
+ <>
+
+ >
+ );
+}
diff --git a/src/components/coordkeeper.jsx b/src/components/coordkeeper.jsx
index f915914..c739230 100644
--- a/src/components/coordkeeper.jsx
+++ b/src/components/coordkeeper.jsx
@@ -1,13 +1,20 @@
import { useEffect, useRef, useState } from "react";
import NuevaCoord from "./NuevaCoord";
+import EditarIcon from "./EditarIcon";
+import ShareIcon from "./ShareIcon";
+import RemoveIcon from "./RemoveIcon";
+import StaticModal from "./StaticModal";
-export default function Keeper({tipo}){
- const [coords,setCoords] = useState(JSON.parse(localStorage.getItem(tipo)||"[]"));
- const collapseRef = useRef(null);
+export default function Keeper({ tipo }) {
+ const [coords, setCoords] = useState(
+ JSON.parse(localStorage.getItem(tipo) || "[]"),
+ );
+ const collapseRef = useRef(null);
+ const [showModal, setModal] = useState(false);
- console.log(coords);
+ console.log(coords);
useEffect(() => {
- const storedCoords = JSON.parse(localStorage.getItem(tipo)||"[]");
+ const storedCoords = JSON.parse(localStorage.getItem(tipo) || "[]");
console.log(storedCoords);
if (storedCoords) {
@@ -15,6 +22,17 @@ export default function Keeper({tipo}){
}
}, [tipo]);
+ const Editar = () => {
+ //wip
+ };
+
+ const Compartir = () => {
+ //wip
+ };
+
+ const Remover = () => {
+ setModal(true);
+ };
const collapseAccordion = () => {
if (collapseRef.current) {
const bsCollapse = new window.bootstrap.Collapse(collapseRef.current, {
@@ -25,6 +43,7 @@ export default function Keeper({tipo}){
};
return (
<>
+ {showModal && }
@@ -48,20 +67,69 @@ export default function Keeper({tipo}){
ref={collapseRef}
>
-
+
-
+
- {coords.length == 0 &&
- No hay Coordenadas que Mostrar.
- }
- {coords.length !=0 && coords.map(x=>
- #{x.num}: x:{x.x} {x.y !== null && `y: ${x.y}`} z:{x.z}
+ {coords.length == 0 && (
+
+ No hay Coordenadas que Mostrar.
+
+ )}
- )}
+
+
+
+ | # |
+ X: |
+ Y: |
+ Z: |
+ |
+
+
+
+ {coords.length != 0 &&
+ coords.map((x) => (
+
+ |
+ #{x.num}:
+ |
+
+ {x.x} |
+ {x.y !== null && `Y: ${x.y}`} |
+ {x.z} |
+
+
+
+
+ |
+
+ ))}
+
+
>
);
}