diff --git a/src/components/Music/Cava.tsx b/src/components/Music/Cava.tsx index 3603884..8e4f8b9 100644 --- a/src/components/Music/Cava.tsx +++ b/src/components/Music/Cava.tsx @@ -3,6 +3,7 @@ import { type InnerKittyProps } from "~/utils/types"; import { CHAR_WIDTH } from "../Kitty"; import { useKitty } from "~/hooks/useKitty"; +// eslint-disable-next-line @typescript-eslint/ban-types export const Cava = (_props: {}) => { const kitty = useKitty(); @@ -65,7 +66,7 @@ const InnerCava = (props: InnerKittyProps) => { ); const requestRef = useRef(); - const calculateBarHeights = () => { + const calculateBarHeights = useCallback(() => { if (!dataArray.current || !analyserRef.current) return; analyserRef.current.getByteFrequencyData(dataArray.current); @@ -99,7 +100,7 @@ const InnerCava = (props: InnerKittyProps) => { setBarHeights(smoothedBarHeights); requestRef.current = requestAnimationFrame(calculateBarHeights); - }; + }, [barHeights, props.cols]); useEffect(() => { const fetchAudio = async () => { @@ -135,7 +136,7 @@ const InnerCava = (props: InnerKittyProps) => { if (audioContextRef.current) { requestRef.current = requestAnimationFrame(calculateBarHeights); } else { - fetchAudio(); + void fetchAudio(); } return () => { diff --git a/src/components/Nvim/NvimTree/index.tsx b/src/components/Nvim/NvimTree/index.tsx index 1376dc4..b901e8e 100644 --- a/src/components/Nvim/NvimTree/index.tsx +++ b/src/components/Nvim/NvimTree/index.tsx @@ -6,7 +6,6 @@ import { type Nvim } from ".."; import { NvimTreeDirectory } from "./NvimTreeDirectory"; import { NvimTreeChild } from "./NvimTreeChild"; import { assets } from "~/assets"; -import { getIcon } from "~/utils/icons"; import { file, folder, diff --git a/src/components/Off.tsx b/src/components/Off.tsx index c79d003..3a5ef4f 100644 --- a/src/components/Off.tsx +++ b/src/components/Off.tsx @@ -17,7 +17,7 @@ export const Off = () => { return () => clearTimeout(timout); } - }, [booting]); + }, [state, setState, booting]); return (
diff --git a/src/components/Waybar/Widgets/WaybarBatteryWidget.tsx b/src/components/Waybar/Widgets/WaybarBatteryWidget.tsx index 6b7cfd0..62294cb 100644 --- a/src/components/Waybar/Widgets/WaybarBatteryWidget.tsx +++ b/src/components/Waybar/Widgets/WaybarBatteryWidget.tsx @@ -5,7 +5,7 @@ import { lerpIcon } from "~/utils/icons"; const ICONS = ["󰂎", "󰁺", "󰁻", "󰁼", "󰁽", "󰁾", "󰁿", "󰂀", "󰂁", "󰂂", "󰁹"]; export const WaybarBatteryWidget = (props: { frequency: number }) => { - const [battery, setBattery] = useState(100); + const [battery] = useState(100); useEffect(() => { const interval = setInterval(() => { diff --git a/src/components/Waybar/Widgets/WaybarWeatherWidget.tsx b/src/components/Waybar/Widgets/WaybarWeatherWidget.tsx index 37bc1b2..7d9d8dd 100644 --- a/src/components/Waybar/Widgets/WaybarWeatherWidget.tsx +++ b/src/components/Waybar/Widgets/WaybarWeatherWidget.tsx @@ -5,10 +5,10 @@ export const WaybarWeatherWidget = () => { const [temperature, setTemperature] = useState("??"); useEffect(() => { - fetch("https://wttr.in/Brest?format=j1") + void fetch("https://wttr.in/Brest?format=j1") .then((response) => response.json()) - .then((data) => - setTemperature(data.current_condition[0].temp_C as string), + .then((data: { current_condition: Array<{ temp_C: string }> }) => + setTemperature(data.current_condition[0].temp_C), ); }, []);