diff --git a/src/components/SelectPosition/SelectPosition.tsx b/src/components/SelectPosition/SelectPosition.tsx index 6619b6ed..f1809836 100644 --- a/src/components/SelectPosition/SelectPosition.tsx +++ b/src/components/SelectPosition/SelectPosition.tsx @@ -3,13 +3,13 @@ import { useToggleButtons } from '@components/shared/ToggleButton'; import { Position } from '@type/models/Position'; +import { POSITIONS_BUTTON } from '@constants/positions'; + export const SelectPosition = ({ setPositions, }: { setPositions: (value: Position[]) => void; }) => { - const positions = ['C', 'PF', 'SF', 'PG', 'SG', '없음']; - const handledToggle = (value: string[]) => { setPositions(value as Position[]); }; @@ -17,11 +17,12 @@ export const SelectPosition = ({ const { handleToggle, selectedItems } = useToggleButtons({ onToggle: handledToggle, isMultipleSelect: true, + noValue: POSITIONS_BUTTON['없음'], }); return ( <> - {positions.map((position) => ( + {Object.values(POSITIONS_BUTTON).map((position) => ( handleToggle(position)} /> ))}