Fix NewContract component to use keys on category list
This commit is contained in:
parent
24643dd76d
commit
2d199dd630
|
@ -220,9 +220,9 @@ export function NewContract(props: { question: string; tag?: string }) {
|
||||||
>
|
>
|
||||||
<option selected={category === ''}></option>
|
<option selected={category === ''}></option>
|
||||||
|
|
||||||
{CATEGORY_LIST.map((cat) => (
|
{Object.entries(CATEGORIES).map(([id, name]) => (
|
||||||
<option selected={category === cat} value={CATEGORIES[cat]}>
|
<option key={id} selected={category === id} value={name}>
|
||||||
{CATEGORIES[cat]}
|
{name}
|
||||||
</option>
|
</option>
|
||||||
))}
|
))}
|
||||||
</select>
|
</select>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user