'showAlertMessage' is assigned a value but never used
232 if (error) {
233 return <>Error</>
234 }
235 const showAlertMessage = ['PW', 'AS', 'UM', 'MP', 'MH', 'US', 'VI', 'GU', 'PR'].includes(country)236
237 return (
238 <>
'Link' is defined but never used
35import { api } from '~app/utils/api'
36import { getSearchResultPageCount, SEARCH_RESULT_PAGE_SIZE } from '~app/utils/constants'
37import { getServerSideTranslations } from '~app/utils/i18n'
38import { Link } from '~ui/components/core/Link' 39
40const MoreFilter = dynamic(() => import('@weareinreach/ui/modals/MoreFilter').then((mod) => mod.MoreFilter))
41const ServiceFilter = dynamic(() =>
'Trans' is defined but never used
16import dynamic from 'next/dynamic'
17import Head from 'next/head'
18import { useRouter } from 'next/router'
19import { Trans, useTranslation } from 'next-i18next' 20import { type GetServerSideProps } from 'nextjs-routes'
21import { type JSX, memo, useCallback, useEffect, useMemo, useState } from 'react'
22import { z } from 'zod'
'Box' is defined but never used
1/* eslint-disable i18next/no-literal-string */
2import {
3 Box, 4 createStyles,
5 Divider,
6 Grid,
Description
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.
Bad Practice
import fs from 'fs' // <- unused
import { readFileSync } from 'fs'
const text = readFileSync('declaration_of_independence.txt', 'utf-8')
console.log(text)
Recommended
import { readFileSync } from 'fs'
const text = readFileSync('declaration_of_independence.txt', 'utf-8')
console.log(text)