Description
frontend/src/App.tsx does not compile. It contains numerous duplicate declarations and references to variables, hooks, and components that are never imported. The TypeScript compiler and the Vite dev server both fail on this file.
Duplicate Declarations
| Identifier |
Declared how many times? |
walletAddress |
2 (once from useWallet(), once as useState) |
tokenBalance |
2 |
disconnect |
2 |
connect function |
3 separate const connect = ... definitions |
Used but Never Imported
The following are referenced in JSX or logic but have no import statement at the top of the file:
theme / setTheme (dark mode state)
showNewForm / setShowNewForm (proposal form toggle)
page / totalPages / setPage (pagination state)
styles (CSS Modules import from App.module.css)
t (i18n translation function from i18n.ts)
AriaLive (component — exists in components/AriaLive/)
ErrorBoundary (component — exists in components/ErrorBoundary/)
ConnectWalletModal (component — exists in components/ConnectWalletModal/)
Pagination (component — exists in components/Pagination/)
Missing Context Provider
useWallet() is called inside App, but App is not wrapped in WalletProvider — this will throw a React context error at runtime.
Acceptance Criteria
Priority
Critical — the frontend does not build.
Estimated Effort
Small-Medium — mechanical fix once the full list of missing imports is confirmed.
Description
frontend/src/App.tsxdoes not compile. It contains numerous duplicate declarations and references to variables, hooks, and components that are never imported. The TypeScript compiler and the Vite dev server both fail on this file.Duplicate Declarations
walletAddressuseWallet(), once asuseState)tokenBalancedisconnectconnectfunctionconst connect = ...definitionsUsed but Never Imported
The following are referenced in JSX or logic but have no import statement at the top of the file:
theme/setTheme(dark mode state)showNewForm/setShowNewForm(proposal form toggle)page/totalPages/setPage(pagination state)styles(CSS Modules import fromApp.module.css)t(i18n translation function fromi18n.ts)AriaLive(component — exists incomponents/AriaLive/)ErrorBoundary(component — exists incomponents/ErrorBoundary/)ConnectWalletModal(component — exists incomponents/ConnectWalletModal/)Pagination(component — exists incomponents/Pagination/)Missing Context Provider
useWallet()is called insideApp, butAppis not wrapped inWalletProvider— this will throw a React context error at runtime.Acceptance Criteria
constdeclarations; each identifier is declared exactly onceconnectfunction definitions; keep one canonical implementationmain.tsxor equivalent) withWalletProvidersouseWallet()has a valid contextnpm run build(TypeScript + Vite) completes with zero type errorsnpm run devstarts without console errors on the initial loadnpm test) continue to passPriority
Critical — the frontend does not build.
Estimated Effort
Small-Medium — mechanical fix once the full list of missing imports is confirmed.