refactor: apply React best practices and migrate to ESLint CLI

- Dynamic import for WordCloud component (code splitting)
- Fix waterfall in handleRefresh with Promise.all
- Memoize data prep functions in overview page (7 useMemo hooks)
- Replace useState+useEffect with useMemo in CountryDisplay/LanguageDisplay
- Memoize navigationCards and class getters in dashboard page
- Extract inline handlers with useCallback
- Fix missing index parameter in TopQuestionsChart map
- Migrate from next lint to ESLint CLI (Next.js 16 deprecation)
This commit is contained in:
2026-01-20 07:05:27 +01:00
parent 5042a6c016
commit 8b3846539f
7 changed files with 298 additions and 288 deletions

View File

@@ -39,7 +39,7 @@ export default function TopQuestionsChart({
</CardHeader>
<CardContent>
<div className="space-y-4">
{data.map((question) => {
{data.map((question, index) => {
const percentage =
maxCount > 0 ? (question.count / maxCount) * 100 : 0;