115 const { t } = useTranslation(['country', 'gov-dist'])
116 // const [primaryList, setPrimaryList] = useState<GeoList[] | undefined>()
117 const [secondaryList, setSecondaryList] = useState<GeoList['districts'] | undefined>()
118 const [tertiaryList, setTertiaryList] = useState<119 NonNullable<GeoList['districts']>[number]['subDistricts'] | undefined
120 >()
121 const [primarySearch, setPrimarySearch] = useState<string | null>(null)
114 // const { control } = useFormContext<FormSchema>()
115 const { t } = useTranslation(['country', 'gov-dist'])
116 // const [primaryList, setPrimaryList] = useState<GeoList[] | undefined>()
117 const [secondaryList, setSecondaryList] = useState<GeoList['districts'] | undefined>()118 const [tertiaryList, setTertiaryList] = useState<
119 NonNullable<GeoList['districts']>[number]['subDistricts'] | undefined
120 >()
132 ? queryParams.data
133 : (['US', 0, 0, 0, 'mi'] as const)
134 const {
135 isSuccess,136 isFetching: searchIsFetching,
137 isLoading: searchIsLoading,
138 ...searchQuery
4
5import { type TServiceModalSchema } from './query.serviceModal.schema'
6
7const serviceModal = async ({ ctx, input }: TRPCHandlerParams<TServiceModalSchema>) => { 8 try {
9 return null
10 } catch (error) {
4
5import { type TServiceModalSchema } from './query.serviceModal.schema'
6
7const serviceModal = async ({ ctx, input }: TRPCHandlerParams<TServiceModalSchema>) => { 8 try {
9 return null
10 } catch (error) {
Unused variables are generally considered a code smell and should be avoided.
Removing unused references - It prevents unused modules from being loaded at runtime, improving performance, and preventing the compiler from loading metadata that will never be used. - It prevents conflicts that may occur when trying to reference another variable.
NOTE: If you have intentionally left a variable unused, we suggest you to prefix the variable name with a _
to prevent them from being flagged by DeepSource.
import fs from 'fs' // <- unused
import { readFileSync } from 'fs'
const text = readFileSync('declaration_of_independence.txt', 'utf-8')
console.log(text)
import { readFileSync } from 'fs'
const text = readFileSync('declaration_of_independence.txt', 'utf-8')
console.log(text)