diff --git a/src/renderer/components/common/ProviderActivityStatusStrip.tsx b/src/renderer/components/common/ProviderActivityStatusStrip.tsx index 1c576dd7..0d6965b3 100644 --- a/src/renderer/components/common/ProviderActivityStatusStrip.tsx +++ b/src/renderer/components/common/ProviderActivityStatusStrip.tsx @@ -19,7 +19,7 @@ interface ProviderActivityState { interface ProviderActivityStatusStripProps { readonly cliStatus: CliInstallationStatus | null | undefined; - readonly sourceCliStatus?: CliInstallationStatus | null | undefined; + readonly sourceCliStatus?: CliInstallationStatus | null; readonly cliStatusLoading: boolean; readonly cliProviderStatusLoading: Partial>; readonly multimodelEnabled: boolean; diff --git a/src/renderer/vendor/radixComposeRefs.ts b/src/renderer/vendor/radixComposeRefs.ts index 1af28e71..aae41de7 100644 --- a/src/renderer/vendor/radixComposeRefs.ts +++ b/src/renderer/vendor/radixComposeRefs.ts @@ -39,35 +39,3 @@ export function composeRefs(...refs: PossibleRef[]): React.RefCallback return undefined; }; } - -export function useComposedRefs(...refs: PossibleRef[]): React.RefCallback { - const refsRef = React.useRef(refs); - refsRef.current = refs; - - return React.useCallback((node) => { - const currentRefs = refsRef.current; - let hasCleanup = false; - const cleanups = currentRefs.map((ref) => { - const cleanup = setRef(ref, node); - if (!hasCleanup && typeof cleanup === 'function') { - hasCleanup = true; - } - return cleanup; - }); - - if (hasCleanup) { - return () => { - for (let index = 0; index < cleanups.length; index += 1) { - const cleanup = cleanups[index]; - if (typeof cleanup === 'function') { - cleanup(); - } else { - setRef(currentRefs[index], null); - } - } - }; - } - - return undefined; - }, []); -}