import React , { useContext } from 'react' ; import ControllersContext from '../ControllersContext' ; import type { Property } from '../../../models/controlles/controlles' ; import { BackgroundRepeatValues } from '../../../models/controlles/background' ; import { useStoreActions , useStoreState } from '../../../reduxStore' ; import SelectController from '../../SelectController' ; import useComputeProperty from '../useComputeProperty' ; const BackgroundRepeat = ( ) : JSX . Element => { const { already } = useContext ( ControllersContext ) ; const propertys = useStoreState < Array < Property > > ( ( state ) => state . background . backgroundRepeatPropertys ) ; const property = useComputeProperty ( propertys ) ; if ( already && ! property ) return < > < />; return < SelectController placeholder = "background-repeat" values = { BackgroundRepeatValues } property = { property } / > ; } ; export default BackgroundRepeat ;