このコミットが含まれているのは:
@@ -3,6 +3,7 @@ import { useEffect, useMemo, useState } from 'react'
|
||||
import { useParams } from 'react-router-dom'
|
||||
|
||||
import { useLocale } from '@/lib/useLocale'
|
||||
import { useUITranslation } from '@/lib/useUITranslation'
|
||||
import TagLink from '@/components/TagLink'
|
||||
import FieldError from '@/components/common/FieldError'
|
||||
import FormField from '@/components/common/FormField'
|
||||
@@ -25,6 +26,7 @@ type DeerjikistFormField =
|
||||
|
||||
|
||||
const DeerjikistDetailPage: FC = () => {
|
||||
const { label } = useUITranslation ('shared')
|
||||
const locale = useLocale ()
|
||||
const { id } = useParams ()
|
||||
const tagId = String (id ?? '')
|
||||
@@ -54,12 +56,13 @@ const DeerjikistDetailPage: FC = () => {
|
||||
setData (await apiPut<Deerjikist[]> (`/tags/${ id }/deerjikists`, data, { locale }))
|
||||
qc.invalidateQueries ({ queryKey: tagsKeys.root })
|
||||
|
||||
toast ({ description: '更新しました.' })
|
||||
toast ({ description: label ('messages.updated') })
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
applyValidationError (e)
|
||||
toast ({ title: '更新失敗', description: '入力内容を確認してください.' })
|
||||
toast ({ title: label ('messages.updateFailed'),
|
||||
description: label ('messages.checkInputContent') })
|
||||
}
|
||||
finally
|
||||
{
|
||||
@@ -106,7 +109,7 @@ const DeerjikistDetailPage: FC = () => {
|
||||
|
||||
{/* プラットフォーム */}
|
||||
<FormField
|
||||
label="プラットフォーム"
|
||||
label={label ('labels.platform')}
|
||||
messages={fieldErrors[`deerjikists${ i }Platform`]}>
|
||||
{({ describedBy, invalid }) => (
|
||||
<select
|
||||
@@ -131,7 +134,7 @@ const DeerjikistDetailPage: FC = () => {
|
||||
|
||||
{/* コード */}
|
||||
<FormField
|
||||
label="コード"
|
||||
label={label ('labels.code')}
|
||||
messages={fieldErrors[`deerjikists${ i }Code`]}>
|
||||
{({ describedBy, invalid }) => (
|
||||
<input
|
||||
@@ -166,7 +169,7 @@ const DeerjikistDetailPage: FC = () => {
|
||||
(disabled
|
||||
? 'text-gray-300 bg-gray-500'
|
||||
: 'text-white bg-blue-500'))}>
|
||||
更新
|
||||
{label ('actions.update')}
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする