Skip to content

Fix navigation blocker#1054

Merged
idormenco merged 1 commit intomainfrom
bugfix/fix-navigation-blocker
Mar 19, 2026
Merged

Fix navigation blocker#1054
idormenco merged 1 commit intomainfrom
bugfix/fix-navigation-blocker

Conversation

@idormenco
Copy link
Contributor

No description provided.

@vercel
Copy link

vercel bot commented Mar 19, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
votemonitor Ready Ready Preview, Comment Mar 19, 2026 3:42pm

Request Review

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

Unused import useNavigate.

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.

Suggested changeset 1
web/src/components/FormEditor/FormEditor.tsx

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/web/src/components/FormEditor/FormEditor.tsx b/web/src/components/FormEditor/FormEditor.tsx
--- a/web/src/components/FormEditor/FormEditor.tsx
+++ b/web/src/components/FormEditor/FormEditor.tsx
@@ -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';
 
EOF
@@ -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';

Copilot is powered by AI and may make mistakes. Always verify output.
@idormenco idormenco merged commit df50d34 into main Mar 19, 2026
4 checks passed
@idormenco idormenco deleted the bugfix/fix-navigation-blocker branch March 19, 2026 16:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant