diff --git a/package-lock.json b/package-lock.json index c23f5286..1bfd240a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,6 +14,7 @@ "@mcschema/java-1.16": "^0.6.3", "@mcschema/java-1.17": "^0.2.23", "@mcschema/locales": "^0.1.20", + "rfdc": "^1.3.0", "seedrandom": "^3.0.5", "split.js": "^1.5.11" }, @@ -2084,6 +2085,11 @@ "node": ">=0.10.0" } }, + "node_modules/rfdc": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.3.0.tgz", + "integrity": "sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA==" + }, "node_modules/rimraf": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", @@ -4070,6 +4076,11 @@ "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", "dev": true }, + "rfdc": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.3.0.tgz", + "integrity": "sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA==" + }, "rimraf": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", diff --git a/package.json b/package.json index 4faf06e8..6abf3df9 100644 --- a/package.json +++ b/package.json @@ -19,6 +19,7 @@ "@mcschema/java-1.16": "^0.6.3", "@mcschema/java-1.17": "^0.2.23", "@mcschema/locales": "^0.1.20", + "rfdc": "^1.3.0", "seedrandom": "^3.0.5", "split.js": "^1.5.11" }, diff --git a/src/app/components/BtnInput.tsx b/src/app/components/BtnInput.tsx index 468dacfd..4e28007d 100644 --- a/src/app/components/BtnInput.tsx +++ b/src/app/components/BtnInput.tsx @@ -11,7 +11,7 @@ type BtnInputProps = { onChange?: (value: string) => unknown, } export function BtnInput({ icon, label, large, type, doSelect, value, onChange }: BtnInputProps) { - const onKeyUp = onChange === undefined ? () => {} : (e: any) => { + const onInput = onChange === undefined ? () => {} : (e: any) => { const value = (e.target as HTMLInputElement).value if (type !== 'number' || (!value.endsWith('.') && !isNaN(Number(value)))) { onChange?.(value) @@ -28,6 +28,6 @@ export function BtnInput({ icon, label, large, type, doSelect, value, onChange } return