chore: linting

This commit is contained in:
Dan Ditomaso
2025-01-25 21:24:43 -05:00
parent d0ca24ae6f
commit f0dd426055
2 changed files with 31 additions and 30 deletions
@@ -4,9 +4,7 @@ import { Input } from "@components/UI/Input.tsx";
import { useDevice } from "@core/stores/deviceStore.ts";
import type { Types } from "@meshtastic/js";
import { SendIcon } from "lucide-react";
import { useCallback, useState, useMemo } from "react";
import { useCallback, useMemo, useState } from "react";
export interface MessageInputProps {
to: Types.Destination;
@@ -29,10 +27,11 @@ export const MessageInput = ({
const debouncedSetMessageDraft = useMemo(
() => debounce(setMessageDraft, 300),
[setMessageDraft]
[setMessageDraft],
);
const sendText = useCallback(async (message: string) => {
const sendText = useCallback(
async (message: string) => {
await connection
?.sendText(message, to, true, channel)
.then((id) =>
@@ -55,7 +54,9 @@ export const MessageInput = ({
e.error,
),
);
}, [channel, connection, myNodeNum, setMessageState, to]);
},
[channel, connection, myNodeNum, setMessageState, to],
);
const handleInputChange = (e: React.ChangeEvent<HTMLInputElement>) => {
const newValue = e.target.value;
+1 -1
View File
@@ -2,7 +2,7 @@ type Callback<Args extends unknown[]> = (...args: Args) => void;
export function debounce<Args extends unknown[]>(
callback: Callback<Args>,
wait: number
wait: number,
): Callback<Args> {
let timeoutId: ReturnType<typeof setTimeout>;