diff --git a/components/unite-attacks-list/AttacksList.tsx b/components/unite-attacks-list/AttacksList.tsx index 6dc6aef8..695c7dc1 100644 --- a/components/unite-attacks-list/AttacksList.tsx +++ b/components/unite-attacks-list/AttacksList.tsx @@ -1,7 +1,7 @@ import type { NextPage } from 'next' import useTranslation from 'next-translate/useTranslation' -type attack = { +type Attack = { id: number name: string name_en: string @@ -9,12 +9,12 @@ type attack = { page_annotation: string } -type apiResponse = { - [key: string]: attack[] +type ApiResponse = { + [key: string]: Attack[] } type Props = { - apiResponse: apiResponse + apiResponse: ApiResponse } export const AttacksList: NextPage = ({ apiResponse }) => { @@ -33,7 +33,7 @@ export const AttacksList: NextPage = ({ apiResponse }) => {
    - {apiResponse[title].map((attack: attack) => { + {apiResponse[title].map((attack: Attack) => { return (
  • diff --git a/pages/unite-attacks-list.tsx b/pages/unite-attacks-list.tsx index 5df485f3..52dcb2a7 100644 --- a/pages/unite-attacks-list.tsx +++ b/pages/unite-attacks-list.tsx @@ -10,7 +10,7 @@ import { SiteFooter } from '@/components/common/SiteFooter' import { AttacksList } from '@/components/unite-attacks-list/AttacksList' -type attack = { +type Attack = { id: number name: string name_en: string @@ -18,13 +18,13 @@ type attack = { page_annotation: string } -type apiResponse = { - [key: string]: attack[] +type ApiResponse = { + [key: string]: Attack[] } const UniteAttacksList: NextPage = () => { const [nowLoading, setNowLoading] = useState(true) - const [apiResponse, setApiResponse] = useState({}) + const [apiResponse, setApiResponse] = useState({}) // TODO: 開発サーバが動的に使えるように環境変数で定義する const apiUrl = 'https://headquarters.suikoden.info/unite_attacks?title=all'