ui: objective-question: index starts with 1

This commit is contained in:
undefined committed 2021-07-30 17:01:36 +08:00
1 parent 0476e6a4b1
commit 18bd8dfa78
2 files changed
+3 -3

No files matched your search

@@ -36,7 +36,7 @@ export default class ObjectiveContainer extends React.PureComponent {
Textbox(args, name) {
return (
<label htmlFor={`textbox${name}`}>
{name}. {args.desc.split('\n').map((i, index) => {
{name + 1}. {args.desc.split('\n').map((i, index) => {
if (index) return <><br />{i}</>;
return i;
})}
@@ -50,7 +50,7 @@ export default class ObjectiveContainer extends React.PureComponent {
Radio(args, name) {
return (
<>
{name}. {args.desc.split('\n').map((i, index) => {
{name + 1}. {args.desc.split('\n').map((i, index) => {
if (index) return <><br />{i}</>;
return i;
})}
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@hydrooj/ui-default",
"version": "4.14.1",
"version": "4.14.2",
"author": "undefined <i@undefined.moe>",
"license": "AGPL-3.0",
"main": "hydro.js",