Skip to content
This repository has been archived by the owner on Jan 15, 2024. It is now read-only.

Commit

Permalink
refactor: 💡 型の命名がローワーキャメルケースだったのでアッパーキャメルケースに修正した
Browse files Browse the repository at this point in the history
  • Loading branch information
nikukyugamer committed Jun 19, 2022
1 parent 737534b commit e6011f8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
10 changes: 5 additions & 5 deletions components/unite-attacks-list/AttacksList.tsx
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
import type { NextPage } from 'next'
import useTranslation from 'next-translate/useTranslation'

type attack = {
type Attack = {
id: number
name: string
name_en: string
character_names: string
page_annotation: string
}

type apiResponse = {
[key: string]: attack[]
type ApiResponse = {
[key: string]: Attack[]
}

type Props = {
apiResponse: apiResponse
apiResponse: ApiResponse
}

export const AttacksList: NextPage<Props> = ({ apiResponse }) => {
Expand All @@ -33,7 +33,7 @@ export const AttacksList: NextPage<Props> = ({ apiResponse }) => {
<div>
<div className="pb-8 max-w-md">
<ul className="list text-left pl-24 pr-24 max-w-md">
{apiResponse[title].map((attack: attack) => {
{apiResponse[title].map((attack: Attack) => {
return (
<li key={attack.id} className="pb-4">
<span>
Expand Down
8 changes: 4 additions & 4 deletions pages/unite-attacks-list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,21 @@ 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
character_names: string
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<apiResponse>({})
const [apiResponse, setApiResponse] = useState<ApiResponse>({})

// TODO: 開発サーバが動的に使えるように環境変数で定義する
const apiUrl = 'https://headquarters.suikoden.info/unite_attacks?title=all'
Expand Down

0 comments on commit e6011f8

Please sign in to comment.