diff --git a/src/app/common/icons/icons.tsx b/src/app/common/icons/icons.tsx index cbfee0b7..0621d08a 100644 --- a/src/app/common/icons/icons.tsx +++ b/src/app/common/icons/icons.tsx @@ -49,7 +49,7 @@ export const ActionsIcon: React.FC = (props) => { }; export const SyncSpin: React.FC<{ - classRef?: React.RefObject; + classRef?: React.RefObject; children?: React.ReactNode; shouldSync?: boolean; }> = (props) => { @@ -120,11 +120,11 @@ export const StatusIndicator: React.FC = (props) => { const { level, className, runningCommands } = props; const iconRef = React.useRef(); const [spinnerVisible, setSpinnerVisible] = React.useState(false); - const [timeout, setTimeoutState] = React.useState(undefined); + const [timeoutState, setTimeoutState] = React.useState(undefined); const clearSpinnerTimeout = () => { - if (timeout) { - clearTimeout(timeout); + if (timeoutState) { + clearTimeout(timeoutState); setTimeoutState(undefined); } setSpinnerVisible(false); @@ -134,7 +134,7 @@ export const StatusIndicator: React.FC = (props) => { * This will apply a delay after there is a running command before showing the spinner. This prevents flickering for commands that return quickly. */ React.useEffect(() => { - if (runningCommands && !timeout) { + if (runningCommands && !timeoutState) { console.log("show spinner"); setTimeoutState( setTimeout(() => { @@ -182,13 +182,13 @@ export const StatusIndicator: React.FC = (props) => { ); }; -export const RotateIcon: React.FC<{ className?: string; onClick?: React.MouseEventHandler }> = ( +export const RotateIcon: React.FC<{ className?: string; onClick?: React.MouseEventHandler }> = ( props ) => { - const iconRef = React.useRef(); + const iconRef = React.useRef(); return ( - + ); };