Skip to content

Commit bb34e80

Browse files
committed
fix: apply lint fixes
1 parent a9450a1 commit bb34e80

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

packages/pluggableWidgets/skiplink-web/src/SkipLink.tsx

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import { useEffect, useRef } from "react";
1+
import { MouseEvent, useEffect, useRef } from "react";
22
import "./ui/SkipLink.scss";
3-
import { SkipLinkContainerProps } from 'typings/SkipLinkProps';
3+
import { SkipLinkContainerProps } from "typings/SkipLinkProps";
44

55
/**
66
* Inserts a skip link as the first child of the element with ID 'root'.
@@ -17,7 +17,7 @@ export function SkipLink(props: SkipLinkContainerProps) {
1717
}
1818
}, [skipLinkRef.current]);
1919

20-
function handleClick(event: React.MouseEvent<HTMLAnchorElement, MouseEvent>): void {
20+
function handleClick(event: MouseEvent<HTMLAnchorElement, MouseEvent>): void {
2121
event.preventDefault();
2222
let main: HTMLElement;
2323
const mainByID = document.getElementById(props.mainContentId);
@@ -40,16 +40,19 @@ export function SkipLink(props: SkipLinkContainerProps) {
4040
main.addEventListener("blur", () => main.removeAttribute("tabindex"), { once: true });
4141
}
4242
} else {
43-
console.error("Could not find a main element on page and no mainContentId specified in widget properties.")
43+
console.error("Could not find a main element on page and no mainContentId specified in widget properties.");
4444
}
4545
}
4646

47-
return <a
47+
return (
48+
<a
4849
ref={skipLinkRef}
49-
className={`skip-link ${props.class}`}
50-
href={`#${props.mainContentId}`}
50+
className={`skip-link ${props.class}`}
51+
href={`#${props.mainContentId}`}
5152
tabIndex={props.tabIndex}
52-
onClick={handleClick}>
53+
onClick={handleClick}
54+
>
5355
{props.linkText}
54-
</a>;
56+
</a>
57+
);
5558
}

0 commit comments

Comments
 (0)