Skip to content

Commit

Permalink
Event type
Browse files Browse the repository at this point in the history
  • Loading branch information
starsep committed Dec 24, 2023
1 parent 06b1de7 commit 7a4a66f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
8 changes: 2 additions & 6 deletions src/components/sidebar/buttons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,23 +83,19 @@ export function CloseSidebarButton({ closeSidebarFunction }: { closeSidebarFunct
);
}

export function AddAedButton({ nextStep }: { nextStep: (event: Event) => void }) {
export function AddAedButton({ nextStep }: { nextStep: (event: React.MouseEvent) => void }) {
const { t } = useTranslation();
return (
// TODO type
// @ts-ignore
<Button color="success" fullwidth form="add_aed" onClick={nextStep}>
<Icon path={mdiMapMarkerPlus} className="icon mr-2" />
{t("footer.add_aed")}
</Button>
);
}

export function SaveAedButton({ nextStep }: { nextStep: (event: Event) => void }) {
export function SaveAedButton({ nextStep }: { nextStep: (event: React.MouseEvent) => void }) {
const { t } = useTranslation();
return (
// TODO type
// @ts-ignore
<Button color="success" fullwidth form="save_aed" onClick={nextStep}>
<Icon path={mdiMapMarkerPlus} className="icon mr-2" />
{t("footer.save_aed")}
Expand Down
2 changes: 1 addition & 1 deletion src/components/sidebar/defibrillatorEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const DefibrillatorEditor: FC<DefibrillatorEditorProps> = ({
return tags;
};

const sendFormData = (event: Event) => {
const sendFormData = (event: React.MouseEvent) => {
event.preventDefault();
if (event.target === null) {
console.error("Form target null");
Expand Down

0 comments on commit 7a4a66f

Please sign in to comment.