fix: fix all eslint errors
This commit is contained in:
@@ -3,6 +3,7 @@ import { type InnerKittyProps } from "~/utils/types";
|
|||||||
import { CHAR_WIDTH } from "../Kitty";
|
import { CHAR_WIDTH } from "../Kitty";
|
||||||
import { useKitty } from "~/hooks/useKitty";
|
import { useKitty } from "~/hooks/useKitty";
|
||||||
|
|
||||||
|
// eslint-disable-next-line @typescript-eslint/ban-types
|
||||||
export const Cava = (_props: {}) => {
|
export const Cava = (_props: {}) => {
|
||||||
const kitty = useKitty();
|
const kitty = useKitty();
|
||||||
|
|
||||||
@@ -65,7 +66,7 @@ const InnerCava = (props: InnerKittyProps<typeof Cava>) => {
|
|||||||
);
|
);
|
||||||
|
|
||||||
const requestRef = useRef<number>();
|
const requestRef = useRef<number>();
|
||||||
const calculateBarHeights = () => {
|
const calculateBarHeights = useCallback(() => {
|
||||||
if (!dataArray.current || !analyserRef.current) return;
|
if (!dataArray.current || !analyserRef.current) return;
|
||||||
|
|
||||||
analyserRef.current.getByteFrequencyData(dataArray.current);
|
analyserRef.current.getByteFrequencyData(dataArray.current);
|
||||||
@@ -99,7 +100,7 @@ const InnerCava = (props: InnerKittyProps<typeof Cava>) => {
|
|||||||
setBarHeights(smoothedBarHeights);
|
setBarHeights(smoothedBarHeights);
|
||||||
|
|
||||||
requestRef.current = requestAnimationFrame(calculateBarHeights);
|
requestRef.current = requestAnimationFrame(calculateBarHeights);
|
||||||
};
|
}, [barHeights, props.cols]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const fetchAudio = async () => {
|
const fetchAudio = async () => {
|
||||||
@@ -135,7 +136,7 @@ const InnerCava = (props: InnerKittyProps<typeof Cava>) => {
|
|||||||
if (audioContextRef.current) {
|
if (audioContextRef.current) {
|
||||||
requestRef.current = requestAnimationFrame(calculateBarHeights);
|
requestRef.current = requestAnimationFrame(calculateBarHeights);
|
||||||
} else {
|
} else {
|
||||||
fetchAudio();
|
void fetchAudio();
|
||||||
}
|
}
|
||||||
|
|
||||||
return () => {
|
return () => {
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ import { type Nvim } from "..";
|
|||||||
import { NvimTreeDirectory } from "./NvimTreeDirectory";
|
import { NvimTreeDirectory } from "./NvimTreeDirectory";
|
||||||
import { NvimTreeChild } from "./NvimTreeChild";
|
import { NvimTreeChild } from "./NvimTreeChild";
|
||||||
import { assets } from "~/assets";
|
import { assets } from "~/assets";
|
||||||
import { getIcon } from "~/utils/icons";
|
|
||||||
import {
|
import {
|
||||||
file,
|
file,
|
||||||
folder,
|
folder,
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ export const Off = () => {
|
|||||||
|
|
||||||
return () => clearTimeout(timout);
|
return () => clearTimeout(timout);
|
||||||
}
|
}
|
||||||
}, [booting]);
|
}, [state, setState, booting]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="flex h-screen w-screen flex-col items-center justify-center bg-black">
|
<div className="flex h-screen w-screen flex-col items-center justify-center bg-black">
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import { lerpIcon } from "~/utils/icons";
|
|||||||
const ICONS = ["", "", "", "", "", "", "", "", "", "", ""];
|
const ICONS = ["", "", "", "", "", "", "", "", "", "", ""];
|
||||||
|
|
||||||
export const WaybarBatteryWidget = (props: { frequency: number }) => {
|
export const WaybarBatteryWidget = (props: { frequency: number }) => {
|
||||||
const [battery, setBattery] = useState(100);
|
const [battery] = useState(100);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const interval = setInterval(() => {
|
const interval = setInterval(() => {
|
||||||
|
|||||||
@@ -5,10 +5,10 @@ export const WaybarWeatherWidget = () => {
|
|||||||
const [temperature, setTemperature] = useState<string>("??");
|
const [temperature, setTemperature] = useState<string>("??");
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
fetch("https://wttr.in/Brest?format=j1")
|
void fetch("https://wttr.in/Brest?format=j1")
|
||||||
.then((response) => response.json())
|
.then((response) => response.json())
|
||||||
.then((data) =>
|
.then((data: { current_condition: Array<{ temp_C: string }> }) =>
|
||||||
setTemperature(data.current_condition[0].temp_C as string),
|
setTemperature(data.current_condition[0].temp_C),
|
||||||
);
|
);
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user