Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Removed commented-out code related to polling station information.
| import SelectFormLanguageDialogContent from "./SelectFormLanguageDialogContent"; | ||
| import { Typography } from "./Typography"; | ||
| import { useState } from "react"; | ||
| import { deleteSecureStoreItemAsync } from "../helpers/SecureStoreWrapper"; |
Check notice
Code scanning / CodeQL
Unused variable, import, function or class Note
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI about 12 hours ago
In general, unused imports should be removed to keep the codebase clean and avoid confusion. They can also marginally improve bundle size and build performance.
For this specific case, the best fix is to delete the unused import of deleteSecureStoreItemAsync from ../helpers/SecureStoreWrapper in mobile/components/PollingStationGeneral.tsx. No other changes are required because there is no usage of that symbol anywhere in the component. This preserves all existing functionality while resolving the CodeQL warning.
Concretely:
- In
mobile/components/PollingStationGeneral.tsx, remove line 20 containingimport { deleteSecureStoreItemAsync } from "../helpers/SecureStoreWrapper";. - No new methods, imports, or definitions are needed.
| @@ -17,7 +17,6 @@ | ||
| import SelectFormLanguageDialogContent from "./SelectFormLanguageDialogContent"; | ||
| import { Typography } from "./Typography"; | ||
| import { useState } from "react"; | ||
| import { deleteSecureStoreItemAsync } from "../helpers/SecureStoreWrapper"; | ||
|
|
||
| interface PollingStationGeneralProps { | ||
| psiData: PollingStationInformationAPIResponse | null | undefined; |
No description provided.