Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
| import { cn, ensureTranslatedStringCorrectness, isNilOrWhitespace, isNotNilOrWhitespace } from '@/lib/utils'; | ||
| import { useBlocker } from '@tanstack/react-router'; | ||
| import { FC, useEffect, useMemo, useState } from 'react'; | ||
| import { useBlocker, useNavigate } from '@tanstack/react-router'; |
Check notice
Code scanning / CodeQL
Unused variable, import, function or class Note
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 5 days ago
In general, unused imports should be removed entirely to improve readability and avoid unnecessary dependencies in the module scope. Since useNavigate is never referenced in this file, we should delete it from the import statement while keeping useBlocker, which may still be in use.
The best fix is to edit web/src/components/FormEditor/FormEditor.tsx at the import line that currently reads import { useBlocker, useNavigate } from '@tanstack/react-router'; and remove useNavigate from the destructured import list. No additional methods, imports, or definitions are required; we are only simplifying the import to include the single actually used symbol.
| @@ -19,7 +19,7 @@ | ||
| import { Button } from '@/components/ui/button'; | ||
| import { LanguageBadge } from '@/components/ui/language-badge'; | ||
| import { cn, ensureTranslatedStringCorrectness, isNilOrWhitespace, isNotNilOrWhitespace } from '@/lib/utils'; | ||
| import { useBlocker, useNavigate } from '@tanstack/react-router'; | ||
| import { useBlocker } from '@tanstack/react-router'; | ||
| import { FC, useMemo, useState } from 'react'; | ||
| import { FormFull } from '../../features/forms/models'; | ||
|
|
No description provided.