From f976eba6963004c4af17318282e9a33907c1875b Mon Sep 17 00:00:00 2001 From: nofurtherinformation Date: Wed, 29 May 2024 11:26:02 -0500 Subject: [PATCH] lint --- app/api/names/route.tsx | 2 +- app/tract/[tract]/page.tsx | 2 +- components/AutoComplete/AutoComplete.tsx | 14 ++++++++------ components/Map/Map.tsx | 2 +- components/Pages/Home/Renderer.tsx | 2 +- components/StatefulControls/PlaceSearch.tsx | 2 +- components/Transition/index.tsx | 7 +++---- 7 files changed, 16 insertions(+), 15 deletions(-) diff --git a/app/api/names/route.tsx b/app/api/names/route.tsx index 72138fe..5df288f 100644 --- a/app/api/names/route.tsx +++ b/app/api/names/route.tsx @@ -1,4 +1,4 @@ -import { ImageResponse } from "next/og" +// import { ImageResponse } from "next/og" import { findNames } from "utils/getFilteredNames" // App router includes @vercel/og. // No need to install it. diff --git a/app/tract/[tract]/page.tsx b/app/tract/[tract]/page.tsx index d3827aa..476f3c0 100644 --- a/app/tract/[tract]/page.tsx +++ b/app/tract/[tract]/page.tsx @@ -1,7 +1,7 @@ +import Head from "next/head" import React from "react" import ReportLayout from "components/ReportLayout" import { getContentDirs } from "utils/contentDirs" -import Head from "next/head" type TractRouteParams = { params: { diff --git a/components/AutoComplete/AutoComplete.tsx b/components/AutoComplete/AutoComplete.tsx index dbfccbe..98ce58a 100644 --- a/components/AutoComplete/AutoComplete.tsx +++ b/components/AutoComplete/AutoComplete.tsx @@ -1,6 +1,6 @@ -import React, { useState, useEffect, useCallback, useRef } from "react" -import { TextField, Box } from "@radix-ui/themes" +import { Box, TextField } from "@radix-ui/themes" import debounce from "lodash.debounce" +import React, { useCallback, useEffect, useRef, useState } from "react" interface AutoCompleteProps { dataCallback: (s: string) => Promise>> @@ -25,6 +25,7 @@ const AutoComplete: React.FC = ({ const [isFocused, setIsFocused] = useState(false) const containerRef = useRef(null) + // eslint-disable-next-line react-hooks/exhaustive-deps const fetchResults = useCallback( debounce(async (searchText: string) => { if (searchText) { @@ -41,6 +42,7 @@ const AutoComplete: React.FC = ({ setResults([]) } }, delay), + // eslint-disable-next-line react-hooks/exhaustive-deps [debounce, dataCallback] ) @@ -67,8 +69,8 @@ const AutoComplete: React.FC = ({ className=" w-full max-w-none rounded border border-gray-300 bg-none p-2 [&>*]:w-full - [&>input]:bg-black/0 [&>*]:text-white + [&>input]:bg-black/0 " > @@ -76,13 +78,13 @@ const AutoComplete: React.FC = ({ {isFocused && (isLoading ? ( - Loading... + Loading... ) : ( results.length > 0 && ( - +
    {results.map((item, index) => ( -
  • +