Remove shadowed variables
This commit is contained in:
+1
-1
@@ -66,7 +66,7 @@ export const AutocompleteTextField = <TFieldValue extends string>({
|
||||
loading={loading}
|
||||
loadingText={loadingText}
|
||||
options={options || []}
|
||||
onChange={(_: any, value: string | null) => onChange(value || '')}
|
||||
onChange={(_: any, v: string | null) => onChange(v || '')}
|
||||
onBlur={onBlur}
|
||||
value={value}
|
||||
autoSelect
|
||||
|
||||
+2
-2
@@ -103,12 +103,12 @@ export const StepPrepareCreatePullRequest = ({
|
||||
const [error, setError] = useState<string>();
|
||||
|
||||
const { loading: groupsLoading, value: groups } = useAsync(async () => {
|
||||
const groups = await catalogApi.getEntities({
|
||||
const groupEntities = await catalogApi.getEntities({
|
||||
filter: { kind: 'group' },
|
||||
});
|
||||
|
||||
// TODO: defaultKind (=group), defaultNamespace (=same as entity)
|
||||
return groups.items.map(e => serializeEntityRef(e) as string).sort();
|
||||
return groupEntities.items.map(e => serializeEntityRef(e) as string).sort();
|
||||
});
|
||||
|
||||
const handleResult = useCallback(
|
||||
|
||||
@@ -245,10 +245,12 @@ function reducer(state: ReducerState, action: ReducerActions): ReducerState {
|
||||
* 3. review
|
||||
* 4. finish
|
||||
*
|
||||
* @param opts options
|
||||
* @param options options
|
||||
*/
|
||||
export const useImportState = (opts?: { initialUrl?: string }): ImportState => {
|
||||
const [state, dispatch] = useReducer(reducer, opts?.initialUrl, init);
|
||||
export const useImportState = (options?: {
|
||||
initialUrl?: string;
|
||||
}): ImportState => {
|
||||
const [state, dispatch] = useReducer(reducer, options?.initialUrl, init);
|
||||
|
||||
const { activeFlow, activeState, analysisUrl, previousStates } = state;
|
||||
|
||||
@@ -283,6 +285,7 @@ export const useImportState = (opts?: { initialUrl?: string }): ImportState => {
|
||||
? () => dispatch({ type: 'onGoBack' })
|
||||
: undefined,
|
||||
|
||||
onReset: () => dispatch({ type: 'onReset', initialUrl: opts?.initialUrl }),
|
||||
onReset: () =>
|
||||
dispatch({ type: 'onReset', initialUrl: options?.initialUrl }),
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user