diff --git a/coldboxinventory b/coldboxinventory new file mode 100644 index 000000000..67565e212 --- /dev/null +++ b/coldboxinventory @@ -0,0 +1,58 @@ +import { useState } from "react"; + +const initialBoxes = [ + { id: 1, name: "BOX 1", cycles: 19 }, + { id: 2, name: "BOX 2", cycles: 19 }, + { id: 3, name: "BOX 3", cycles: 20 }, + { id: 4, name: "BOX 4", cycles: 20 }, + { id: 5, name: "BOX 5", cycles: 70 }, + { id: 6, name: "BOX 6", cycles: 70 }, + { id: 7, name: "BOX 7", cycles: 70 }, + { id: 8, name: "BOX 8", cycles: 70 }, + { id: 9, name: "BOX 9", cycles: 70 }, + { id: 10, name: "BOX 10", cycles: 70 }, + { id: 11, name: "BOX 11", cycles: 69 }, + { id: 12, name: "BOX 12", cycles: 69 }, + { id: 13, name: "BOX 13", cycles: 69 }, + { id: 14, name: "BOX 14", cycles: 69 }, +]; + +export default function ColdBoxInventory() { + const [boxes, setBoxes] = useState(initialBoxes); + + const incrementCycle = (id) => { + setBoxes((prevBoxes) => + prevBoxes.map((box) => + box.id === id && box.cycles < 70 + ? { ...box, cycles: box.cycles + 1 } + : box + ) + ); + }; + + const getCycleColor = (cycles) => { + if (cycles >= 70) return "bg-red-500 text-white"; + if (cycles >= 60) return "bg-yellow-300"; + return "bg-green-200"; + }; + + return ( +
Cycles: {box.cycles}
+Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies: