Skip to content

Commit

Permalink
fix: TODO comment
Browse files Browse the repository at this point in the history
  • Loading branch information
koumura-a-tm committed Aug 1, 2024
1 parent 786f5ce commit 3574324
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/components/Button/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export const Button = ({
setSelected: Dispatch<SetStateAction<number[]>>
}) => {
// ボタンが選択されているかどうかの状態 を管理するフック
// TODO: これ不要そう?
const [isChecked, setIsChecked] = useState(false)

// ボタンがクリックされたときのハンドラー
Expand Down
2 changes: 2 additions & 0 deletions src/hooks/usePopulate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import { PopulationData, PopulationResponse } from '@/types/population'
import { usePref } from '@/hooks/usePref'

// 都道府県ごとの人口データを取得する関数

// TODO: 新規取得 map のところが処理重複してそう 毎回全データ取ってきてそう
const fetchPopulationData = async (pref: { prefCode: number; prefName: string }[]) => {
const promiseFunc = pref.map(async (item) => {
// https://opendata.resas-portal.go.jp/docs/api/v1/population/composition/perYear.html
Expand Down
2 changes: 2 additions & 0 deletions src/hooks/usePref.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,7 @@ export const usePref = () => {
})

// 都道府県データ と その更新関数 を返す

// TODO: Result だけでいけそうかも?
return { pref, setPref }
}

0 comments on commit 3574324

Please sign in to comment.