fix(validate): clear release lint errors
This commit is contained in:
parent
6e5346094d
commit
23d1ba4107
2 changed files with 1 additions and 33 deletions
|
|
@ -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<Record<CliProviderId, boolean>>;
|
||||
readonly multimodelEnabled: boolean;
|
||||
|
|
|
|||
32
src/renderer/vendor/radixComposeRefs.ts
vendored
32
src/renderer/vendor/radixComposeRefs.ts
vendored
|
|
@ -39,35 +39,3 @@ export function composeRefs<T>(...refs: PossibleRef<T>[]): React.RefCallback<T>
|
|||
return undefined;
|
||||
};
|
||||
}
|
||||
|
||||
export function useComposedRefs<T>(...refs: PossibleRef<T>[]): React.RefCallback<T> {
|
||||
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;
|
||||
}, []);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue