디바이스 목록 key 중복 수정: deviceId+index 조합
This commit is contained in:
parent
9dbf5c2a08
commit
2392d05ded
2 changed files with 4 additions and 4 deletions
|
|
@ -108,9 +108,9 @@ export function OnboardingModal({ open, onClose }: OnboardingModalProps): React.
|
||||||
사용할 마이크를 선택하세요. 나중에 설정에서 변경할 수 있습니다.
|
사용할 마이크를 선택하세요. 나중에 설정에서 변경할 수 있습니다.
|
||||||
</Typography>
|
</Typography>
|
||||||
<Stack spacing={1} mb={3}>
|
<Stack spacing={1} mb={3}>
|
||||||
{devices.map((d) => (
|
{devices.map((d, idx) => (
|
||||||
<Box
|
<Box
|
||||||
key={d.deviceId}
|
key={`${d.deviceId}-${idx}`}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
setSelectedDevice(d.deviceId)
|
setSelectedDevice(d.deviceId)
|
||||||
window.electronAPI.audio.setSelectedDevice({ deviceId: d.deviceId })
|
window.electronAPI.audio.setSelectedDevice({ deviceId: d.deviceId })
|
||||||
|
|
|
||||||
|
|
@ -494,8 +494,8 @@ export function SettingsModal({ open, onClose }: SettingsModalProps): React.Reac
|
||||||
}}
|
}}
|
||||||
startAdornment={<MicIcon sx={{ color: d3roPalette.text.inactive, mr: 1, fontSize: 18 }} />}
|
startAdornment={<MicIcon sx={{ color: d3roPalette.text.inactive, mr: 1, fontSize: 18 }} />}
|
||||||
>
|
>
|
||||||
{audioDevices.map((device) => (
|
{audioDevices.map((device, idx) => (
|
||||||
<MenuItem key={device.deviceId} value={device.deviceId}>
|
<MenuItem key={`${device.deviceId}-${idx}`} value={device.deviceId}>
|
||||||
{device.label}{device.isDefault ? ' (기본)' : ''}
|
{device.label}{device.isDefault ? ' (기본)' : ''}
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
))}
|
))}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue