Skip to content

Commit

Permalink
fix: type
Browse files Browse the repository at this point in the history
  • Loading branch information
sattvikc committed Jul 15, 2024
1 parent 8e5804e commit 61a67e7
Showing 11 changed files with 15 additions and 46 deletions.
2 changes: 1 addition & 1 deletion build/static/css/main.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/static/css/main.css.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/static/js/bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/static/js/bundle.js.map

Large diffs are not rendered by default.

10 changes: 2 additions & 8 deletions src/ui/components/auth/SignInContent.tsx
Original file line number Diff line number Diff line change
@@ -116,19 +116,13 @@ const SignInContent: React.FC<SignInContentProps> = ({
};

const handleEmailFieldChange = (
e:
| React.ChangeEvent<HTMLInputElement>
| React.ChangeEvent<HTMLTextAreaElement>
| React.ChangeEvent<HTMLSelectElement>
e: React.ChangeEvent<HTMLInputElement> | React.ChangeEvent<HTMLTextAreaElement>
) => {
setEmail(e.target.value);
};

const handlePasswordFieldChange = (
e:
| React.ChangeEvent<HTMLInputElement>
| React.ChangeEvent<HTMLTextAreaElement>
| React.ChangeEvent<HTMLSelectElement>
e: React.ChangeEvent<HTMLInputElement> | React.ChangeEvent<HTMLTextAreaElement>
) => {
setPassword(e.target.value);
};
5 changes: 1 addition & 4 deletions src/ui/components/auth/SignInWithApiKeyContent.tsx
Original file line number Diff line number Diff line change
@@ -53,10 +53,7 @@ const SignInWithApiKeyContent = (props: SignInWithApiKeyContentProps) => {
};

const handleApiKeyFieldChange = (
e:
| React.ChangeEvent<HTMLInputElement>
| React.ChangeEvent<HTMLTextAreaElement>
| React.ChangeEvent<HTMLSelectElement>
e: React.ChangeEvent<HTMLInputElement> | React.ChangeEvent<HTMLTextAreaElement>
) => {
setApiKey(e.target.value);
};
14 changes: 2 additions & 12 deletions src/ui/components/inputField/InputDropdown.tsx
Original file line number Diff line number Diff line change
@@ -32,12 +32,7 @@ export type InputDropdownPropTypes = {
disabled?: boolean;
prefix?: string;
autofocus?: boolean;
handleChange: (
event:
| React.ChangeEvent<HTMLInputElement>
| React.ChangeEvent<HTMLTextAreaElement>
| React.ChangeEvent<HTMLSelectElement>
) => void;
handleChange: (event: React.ChangeEvent<HTMLInputElement> | React.ChangeEvent<HTMLTextAreaElement>) => void;
/** @default "bottom" */
errorPlacement?: "bottom" | "prefix-tooltip";
};
@@ -51,12 +46,7 @@ const InputDropdown: React.FC<InputDropdownPropTypes> = (props) => {
const inputRef = useRef<HTMLInputElement>(null);

const onChange = useCallback(
(
event:
| React.ChangeEvent<HTMLInputElement>
| React.ChangeEvent<HTMLTextAreaElement>
| React.ChangeEvent<HTMLSelectElement>
) => {
(event: React.ChangeEvent<HTMLInputElement> | React.ChangeEvent<HTMLTextAreaElement>) => {
setIsTouched(true);
handleChange(event);
},
7 changes: 1 addition & 6 deletions src/ui/components/inputField/InputField.tsx
Original file line number Diff line number Diff line change
@@ -32,12 +32,7 @@ export type InputFieldPropTypes = {
disabled?: boolean;
prefix?: string;
autofocus?: boolean;
handleChange: (
event:
| React.ChangeEvent<HTMLInputElement>
| React.ChangeEvent<HTMLTextAreaElement>
| React.ChangeEvent<HTMLSelectElement>
) => void;
handleChange: (event: React.ChangeEvent<HTMLInputElement> | React.ChangeEvent<HTMLTextAreaElement>) => void;
/** @default "bottom" */
errorPlacement?: "bottom" | "prefix-tooltip";
};
Original file line number Diff line number Diff line change
@@ -50,7 +50,7 @@ export const ClientConfig = ({
const [isDeleteDialogOpen, setIsDeleteDialogOpen] = useState(false);
const handleClientFieldChange = (
name: string,
e: ChangeEvent<HTMLInputElement> | React.ChangeEvent<HTMLTextAreaElement> | React.ChangeEvent<HTMLSelectElement>
e: ChangeEvent<HTMLInputElement> | React.ChangeEvent<HTMLTextAreaElement>
) => {
if (e.type === "change") {
setClient({ ...client, [name]: e.target.value });
@@ -59,7 +59,7 @@ export const ClientConfig = ({

const handleAdditionalConfigChange = (
key: string,
e: ChangeEvent<HTMLInputElement> | React.ChangeEvent<HTMLTextAreaElement> | React.ChangeEvent<HTMLSelectElement>
e: ChangeEvent<HTMLInputElement> | React.ChangeEvent<HTMLTextAreaElement>
) => {
let found = false;
const newAdditionalConfig: [string, string | null][] = client.additionalConfig.map(([k, v]) => {
Original file line number Diff line number Diff line change
@@ -112,9 +112,7 @@ export const ProviderInfoForm = ({
});
};

const handleFieldChange = (
e: ChangeEvent<HTMLInputElement> | React.ChangeEvent<HTMLTextAreaElement> | React.ChangeEvent<HTMLSelectElement>
) => {
const handleFieldChange = (e: ChangeEvent<HTMLInputElement> | React.ChangeEvent<HTMLTextAreaElement>) => {
if (e.type === "change") {
setProviderConfigState({ ...providerConfigState, [e.target.name]: e.target.value });
}
@@ -151,7 +149,7 @@ export const ProviderInfoForm = ({
};

const handleThirdPartyIdSuffixChange = (
e: ChangeEvent<HTMLInputElement> | React.ChangeEvent<HTMLTextAreaElement> | React.ChangeEvent<HTMLSelectElement>
e: ChangeEvent<HTMLInputElement> | React.ChangeEvent<HTMLTextAreaElement>
) => {
if (e.type !== "change") {
return;
Original file line number Diff line number Diff line change
@@ -21,12 +21,7 @@ type Props = {
fieldName: "first_name" | "last_name";
label: string;
isEditing: boolean;
onChange: (
event:
| React.ChangeEvent<HTMLInputElement>
| React.ChangeEvent<HTMLTextAreaElement>
| React.ChangeEvent<HTMLSelectElement>
) => void;
onChange: (event: React.ChangeEvent<HTMLInputElement> | React.ChangeEvent<HTMLTextAreaElement>) => void;
};

export const UserDetailNameField: React.FC<Props> = ({ value, fieldName, label, isEditing, onChange }: Props) => {

0 comments on commit 61a67e7

Please sign in to comment.