fix eslint warnings

This commit is contained in:
ennmichael
2023-02-07 20:47:57 +01:00
committed by Kieran
parent 61e6876c6d
commit 441983b8ae
89 changed files with 1018 additions and 588 deletions

View File

@ -1,4 +1,4 @@
import { useEffect, useRef, WheelEvent, LegacyRef } from "react";
import { useEffect, useRef, LegacyRef } from "react";
function useHorizontalScroll() {
const elRef = useRef<HTMLDivElement>();
@ -10,9 +10,7 @@ function useHorizontalScroll() {
ev.preventDefault();
el.scrollTo({ left: el.scrollLeft + ev.deltaY, behavior: "smooth" });
};
// @ts-ignore
el.addEventListener("wheel", onWheel);
// @ts-ignore
return () => el.removeEventListener("wheel", onWheel);
}
}, []);

View File

@ -5,7 +5,7 @@ declare global {
webln?: {
enabled: boolean;
enable: () => Promise<void>;
sendPayment: (pr: string) => Promise<any>;
sendPayment: (pr: string) => Promise<unknown>;
};
}
}
@ -15,7 +15,7 @@ export default function useWebln(enable = true) {
useEffect(() => {
if (maybeWebLn && !maybeWebLn.enabled && enable) {
maybeWebLn.enable().catch((error) => {
maybeWebLn.enable().catch(() => {
console.debug("Couldn't enable WebLN");
});
}