@@ -30,7 +30,7 @@ interface ObservablePropertyPanelProps {
3030 header : string ;
3131}
3232
33- export function ObservableProperty ( { quality, property, identifier, name, unitId } : ObservablePropertyProps ) : React . ReactElement {
33+ export function ObservableProperty ( { quality, property, identifier, name, unitId } : Readonly < ObservablePropertyProps > ) : React . ReactElement {
3434 const url = `/unit/${ unitId } /update/${ property } /${ identifier } ` ;
3535 const color = COLORS [ quality ] || 'primary' ;
3636 const icon = ICONS [ identifier ] ;
@@ -40,7 +40,7 @@ export function ObservableProperty({ quality, property, identifier, name, unitId
4040 return < Link to = { url } className = { buttonClassName } > < span className = { iconClassName } > </ span > < br /> { name . fi } </ Link > ;
4141}
4242
43- export function ObservablePropertyPanel ( { allowedValues, header } : ObservablePropertyPanelProps ) : React . ReactElement {
43+ export function ObservablePropertyPanel ( { allowedValues, header } : Readonly < ObservablePropertyPanelProps > ) : React . ReactElement {
4444 const amountOfValues = allowedValues . length ;
4545 const cutPoint = ( amountOfValues / 2 ) + ( amountOfValues % 2 ) ;
4646 const left = allowedValues . slice ( 0 , cutPoint ) ;
@@ -65,7 +65,7 @@ export function ObservablePropertyPanel({ allowedValues, header }: ObservablePro
6565
6666const UnitDetails : React . FC = ( ) => {
6767 const params = useParams < { unitId : string } > ( ) ;
68- const unitId = params . unitId ! ;
68+ const unitId = params . unitId ;
6969
7070 const unit = useSelector ( ( state : RootState ) => state . data . unit [ unitId ] ) ;
7171 const isLoading = useSelector ( ( state : RootState ) => state . data . loading . unit === true ) ;
0 commit comments