diff --git a/src/components/pages/Artifacts.tsx b/src/components/pages/Artifacts.tsx index d1be637..33b13e0 100644 --- a/src/components/pages/Artifacts.tsx +++ b/src/components/pages/Artifacts.tsx @@ -17,6 +17,7 @@ export default function Artifacts() { const [selectedMainStat, setSelectedMainStat] = useState(0); const [selectedAffixes, setSelectedAffixes] = useState([]); const [selectedAffixesAmount, setSelectedAffixesAmount] = useState>({}); + const [artifactEnhancements, setArtifactEnhancements] = useState(0); const [artifactData, setArtifactData] = useState([]); @@ -52,7 +53,7 @@ export default function Artifacts() { useEffect(() => { handleGeneratedArtifact() - }, [uid, selectedArtifact, selectedMainStat, selectedAffixes, selectedAffixesAmount]); + }, [uid, selectedArtifact, selectedMainStat, selectedAffixes, selectedAffixesAmount, artifactEnhancements]); const handleArtifactChange = (event: any, value: any) => { if (value !== null) { @@ -101,10 +102,9 @@ export default function Artifacts() { return x; }); } - const generated = "/giveart "+uid+" "+selectedArtifact+" "+selectedMainStat+" "+selectedAffixesCombine.join(" ")+" 21"; + const generated = "/giveart "+uid+" "+selectedArtifact+" "+selectedMainStat+" "+selectedAffixesCombine.join(" ")+" "+Number(artifactEnhancements+1); setGeneratedArtifact(generated); }; - return (
@@ -178,6 +178,16 @@ export default function Artifacts() { })}
+
+ +
+ setArtifactEnhancements(Number(e.currentTarget.value))}/> +
+
{navigator.clipboard.writeText(e.currentTarget.value)}} className="block w-full shadow-sm focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm border-gray-300 rounded-md" value={generatedArtifact} readOnly/>