1- import React , { useEffect , useState , useCallback } from 'react'
1+ import React , { useEffect , useState , useCallback , useId } from 'react'
22import { useGameStatus , useGamePlatform , useGamePlayWith , useGamePlayedStatus } from '@/hooks'
33import { GAME_PROPERTY_FIELDS } from '@/models/api/ImportExport'
44import type { ConfigurableGameProperty , GameImportConfig , GameExportConfig , ImportPropertyOverride , ExportPropertyOverride } from '@/models/api/ImportExport'
@@ -21,6 +21,7 @@ interface PropertyConfigPanelProps {
2121}
2222
2323const PropertyConfigPanel : React . FC < PropertyConfigPanelProps > = ( { panelMode, config, onChange, headingLabel } ) => {
24+ const radioGroupId = useId ( )
2425 const { fetchActiveStatusList } = useGameStatus ( )
2526 const { fetchList : fetchPlatforms } = useGamePlatform ( )
2627 const { fetchOptions : fetchPlayWithList } = useGamePlayWith ( )
@@ -233,15 +234,15 @@ const PropertyConfigPanel: React.FC<PropertyConfigPanelProps> = ({ panelMode, co
233234 { /* Mode toggle */ }
234235 < div className = 'pcp__mode-toggle' >
235236 < label className = { `pcp__mode-btn ${ config . mode === 'simple' ? 'is-active' : '' } ` } >
236- < input type = 'radio' name = { `pcp-mode- ${ headingLabel ?? 'global' } ` } checked = { config . mode === 'simple' } onChange = { ( ) => handleModeToggle ( 'simple' ) } />
237+ < input type = 'radio' name = { radioGroupId } checked = { config . mode === 'simple' } onChange = { ( ) => handleModeToggle ( 'simple' ) } />
237238 { panelMode === 'import' ? 'As Imported (all)' : 'As Stored (all)' }
238239 </ label >
239240 < label className = { `pcp__mode-btn ${ config . mode === 'customCleared' ? 'is-active' : '' } ` } >
240- < input type = 'radio' name = { `pcp-mode- ${ headingLabel ?? 'global' } ` } checked = { config . mode === 'customCleared' } onChange = { ( ) => handleModeToggle ( 'customCleared' ) } />
241+ < input type = 'radio' name = { radioGroupId } checked = { config . mode === 'customCleared' } onChange = { ( ) => handleModeToggle ( 'customCleared' ) } />
241242 Custom Cleared
242243 </ label >
243244 < label className = { `pcp__mode-btn ${ config . mode === 'custom' ? 'is-active' : '' } ` } >
244- < input type = 'radio' name = { `pcp-mode- ${ headingLabel ?? 'global' } ` } checked = { config . mode === 'custom' } onChange = { ( ) => handleModeToggle ( 'custom' ) } />
245+ < input type = 'radio' name = { radioGroupId } checked = { config . mode === 'custom' } onChange = { ( ) => handleModeToggle ( 'custom' ) } />
245246 Custom (per property)
246247 </ label >
247248 </ div >
0 commit comments