Skip to content

Commit c64f35d

Browse files
committed
linted, not great, but linted
1 parent 80ec405 commit c64f35d

File tree

5 files changed

+18
-18
lines changed

5 files changed

+18
-18
lines changed

packages/connect-react/src/components/ControlBoolean.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ import { useCustomize } from "../hooks/customization-context";
44
import type { CSSProperties } from "react";
55

66
export function ControlBoolean() {
7-
const props = useFormFieldContext<ConfigurablePropBoolean>();
7+
const formFieldContextProps = useFormFieldContext<ConfigurablePropBoolean>();
88
const {
99
id, value, onChange,
10-
} = props;
10+
} = formFieldContextProps;
1111
const { getProps } = useCustomize();
1212
const baseStyles: CSSProperties = {
1313
width: "16px",

packages/connect-react/src/components/ControlInput.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ import { useFormFieldContext } from "../hooks/form-field-context";
33
import { useCustomize } from "../hooks/customization-context";
44

55
export function ControlInput() {
6-
const props = useFormFieldContext();
6+
const formFieldContextProps = useFormFieldContext();
77
const {
88
id, onChange, prop, value,
9-
} = props;
9+
} = formFieldContextProps;
1010
const {
1111
getProps, theme,
1212
} = useCustomize();
@@ -53,7 +53,7 @@ export function ControlInput() {
5353
name={prop.name}
5454
value={value ?? ""}
5555
onChange={(e) => onChange(toOnChangeValue(e.target.value))}
56-
{...getProps("controlInput", baseStyles, props)}
56+
{...getProps("controlInput", baseStyles, formFieldContextProps)}
5757
min={"min" in prop
5858
? prop.min
5959
: undefined}

packages/connect-react/src/components/SelectApp.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,23 +32,23 @@ export function SelectApp({
3232
className="react-select-container text-sm"
3333
classNamePrefix="react-select"
3434
components={{
35-
Option: (props) => (
36-
<Option {...props}>
35+
Option: (optionProps) => (
36+
<Option {...optionProps}>
3737
<div style={{
3838
display: "flex",
3939
gap: 10,
4040
}}>
4141
<img
42-
src={`https://pipedream.com/s.v0/${props.data.id}/logo/48`}
42+
src={`https://pipedream.com/s.v0/${optionProps.data.id}/logo/48`}
4343
style={{
4444
height: 24,
4545
width: 24,
4646
}}
47-
alt={props.data.name}
47+
alt={optionProps.data.name}
4848
/>
4949
<span style={{
5050
whiteSpace: "nowrap",
51-
}}>{props.data.name}</span>
51+
}}>{optionProps.data.name}</span>
5252
</div>
5353
</Option>
5454
),

packages/connect-react/src/hooks/customization-context.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -268,9 +268,9 @@ export function useCustomize(): Customization {
268268
};
269269
}
270270

271-
export const CustomizeProvider: React.FC<CustomizationConfig & { children: React.ReactNode; }> = ({
271+
export const CustomizeProvider = ({
272272
children,
273273
...customizationProps
274-
}) => {
274+
}: CustomizationConfig<any, any, any> & { children: React.ReactNode; }) => { // eslint-disable-line @typescript-eslint/no-explicit-any
275275
return <CustomizationContext.Provider value={customizationProps}>{children}</CustomizationContext.Provider>;
276276
};

packages/connect-react/src/hooks/form-context.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,15 @@ type FormContextProviderProps<T extends ConfigurableProps> = {
4949
};
5050

5151
export const FormContextProvider = <T extends ConfigurableProps>({
52-
children, props,
52+
children, props: formProps,
5353
}: FormContextProviderProps<T>) => {
5454
const client = useFrontendClient();
5555

5656
const id = useId();
5757

5858
const {
5959
component, configuredProps: __configuredProps, propNames, userId,
60-
} = props;
60+
} = formProps;
6161
const componentId = component.key;
6262

6363
const [
@@ -90,8 +90,8 @@ export const FormContextProvider = <T extends ConfigurableProps>({
9090
_configuredProps,
9191
_setConfiguredProps,
9292
] = useState(configuredProps);
93-
const setConfiguredProps = props.onUpdateConfiguredProps || _setConfiguredProps;
94-
if (!props.onUpdateConfiguredProps) {
93+
const setConfiguredProps = formProps.onUpdateConfiguredProps || _setConfiguredProps;
94+
if (!formProps.onUpdateConfiguredProps) {
9595
configuredProps = _configuredProps;
9696
}
9797

@@ -130,7 +130,7 @@ export const FormContextProvider = <T extends ConfigurableProps>({
130130
});
131131

132132
// XXX fix types of dynamicProps, props.component so this type decl not needed
133-
let configurableProps: T = dynamicProps?.configurable_props || props.component.configurable_props || [];
133+
let configurableProps: T = dynamicProps?.configurable_props || formProps.component.configurable_props || [];
134134
if (propNames?.length) {
135135
const _configurableProps = [];
136136
for (const prop of configurableProps) {
@@ -299,7 +299,7 @@ export const FormContextProvider = <T extends ConfigurableProps>({
299299
const value: FormContext<T> = {
300300
id,
301301
isValid: !Object.keys(errors).length, // XXX want to expose more from errors
302-
props,
302+
props: formProps,
303303
userId,
304304
component,
305305
configurableProps,

0 commit comments

Comments
 (0)