diff --git a/components/AwakeningSelect/index.tsx b/components/AwakeningSelect/index.tsx index 5f7f3b61..7ecd9740 100644 --- a/components/AwakeningSelect/index.tsx +++ b/components/AwakeningSelect/index.tsx @@ -1,9 +1,8 @@ -import React, { ForwardedRef, useEffect, useState } from 'react' +import React, { useEffect, useState } from 'react' import { useRouter } from 'next/router' import { useTranslation } from 'next-i18next' -import Input from '~components/LabelledInput' -import Select from '~components/Select' +import SelectWithInput from '~components/SelectWithInput' import SelectItem from '~components/SelectItem' import classNames from 'classnames' @@ -41,6 +40,24 @@ const AwakeningSelect = (props: Props) => { const [error, setError] = useState('') + // Data + const dataSet = () => { + if (props.object === 'character') return characterAwakening + else { + const weaponDataSet = weaponAwakening + + weaponDataSet.unshift({ + id: 0, + name: { + en: 'No awakening', + ja: '覚醒なし', + }, + }) + + return weaponDataSet + } + } + // Classes const inputClasses = classNames({ Bound: true, @@ -163,36 +180,16 @@ const AwakeningSelect = (props: Props) => { } return ( -
{error}
-