Radarr/frontend/src/Collection/CollectionFooterLabel.tsx
admin 1b42fe1e25 fix: mark React component props as Readonly
Bulk update to make all component props immutable at the type level.
This prevents accidental prop mutation and improves type safety.

Resolves ~50 SonarCloud code smells.
2025-12-18 15:31:40 -06:00

32 lines
676 B
TypeScript

import React from 'react';
import SpinnerIcon from 'Components/SpinnerIcon';
import { icons } from 'Helpers/Props';
import styles from './CollectionFooterLabel.css';
interface CollectionFooterLabelProps {
className?: string;
label: string;
isSaving: boolean;
}
function CollectionFooterLabel({
className = styles.label,
label,
isSaving,
}: Readonly<CollectionFooterLabelProps>) {
return (
<div className={className}>
{label}
{isSaving ? (
<SpinnerIcon
className={styles.savingIcon}
name={icons.SPINNER}
isSpinning={true}
/>
) : null}
</div>
);
}
export default CollectionFooterLabel;