Skip to content

Commit

Permalink
fix: eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
casperiv0 committed Oct 19, 2023
1 parent 5b29157 commit 9e3dc04
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,5 @@ export function SpeechAlert(props: SpeechAlertProps) {
speaked.current = true;
}, [props]); // eslint-disable-line react-hooks/exhaustive-deps

return props.children as JSX.Element;
return props.children as React.JSX.Element;
}
5 changes: 4 additions & 1 deletion apps/client/src/components/modal-buttons/modal-button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ import type { EmsFdDeputy } from "@snailycad/types";
import type { ActiveOfficer } from "state/leo-state";
import { useAuth } from "context/AuthContext";

type ButtonProps = Pick<JSX.IntrinsicElements["button"], "name" | "type" | "title" | "disabled">;
type ButtonProps = Pick<
React.JSX.IntrinsicElements["button"],
"name" | "type" | "title" | "disabled"
>;
interface Props extends ButtonProps {
button: ModalButton;
unit?: ActiveOfficer | EmsFdDeputy | null;
Expand Down
2 changes: 1 addition & 1 deletion apps/client/src/components/shared/VersionDisplay.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export function VersionDisplay({ cad }: Props) {
);
}

function Link(props: JSX.IntrinsicElements["a"]) {
function Link(props: React.JSX.IntrinsicElements["a"]) {
return (
<a
{...props}
Expand Down
2 changes: 1 addition & 1 deletion apps/client/src/components/shared/image-wrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ interface Props extends ImageProps {
}

export function ImageWrapper(props: Props) {
const fallback = (props.fallback ?? null) as JSX.Element;
const fallback = (props.fallback ?? null) as React.JSX.Element;
const [hasError, setHasError] = React.useState(false);

return hasError ? fallback : <Image {...props} onError={() => setHasError(true)} />;
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/components/fields/date-picker-field.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export function DatePickerField({ value: _value, ...rest }: Props) {
)}
>
{isMounted ? <DateField errorMessage={rest.errorMessage} {...fieldProps} /> : null}
{state.validationState === "invalid" && (
{state.isInvalid && (
<ExclamationCircle className="w-6 h-6 text-red-500 absolute right-1" />
)}
</div>
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/components/inputs/checkbox.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as React from "react";
import { cn } from "mxcn";

type Props = JSX.IntrinsicElements["input"];
type Props = React.JSX.IntrinsicElements["input"];

export const Checkbox = React.forwardRef<HTMLInputElement, Props>((props, ref) => (
<input
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/components/inputs/input.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { cn } from "mxcn";
import * as React from "react";

type Props = Omit<JSX.IntrinsicElements["input"], "id"> & {
type Props = Omit<React.JSX.IntrinsicElements["input"], "id"> & {
errorMessage?: string | null;
};

Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/components/inputs/textarea.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as React from "react";
import { cn } from "mxcn";

type Props = Omit<JSX.IntrinsicElements["textarea"], "id" | "ref"> & {
type Props = Omit<React.JSX.IntrinsicElements["textarea"], "id" | "ref"> & {
errorMessage?: string | null;
};

Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/components/multi-form/multi-form-step.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export interface MultiFormStepItem<FormValues extends FormikValues> {
title: string;
id: string;
isRequired?: boolean;
children(formikState: FormikProps<FormValues>): JSX.Element | null;
children(formikState: FormikProps<FormValues>): React.JSX.Element | null;
}

export function MultiFormStep<FormValues extends FormikValues>(
Expand Down

0 comments on commit 9e3dc04

Please sign in to comment.