From 338ac1962807520e8e3a38e2ca7e8c2c233a1201 Mon Sep 17 00:00:00 2001 From: Refactoring Agent <[email protected]> Date: Mon, 4 May 2026 21:30:48 +0200 Subject: [PATCH] fix: remaining tab migrations to modular stores MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - CraftingProgress, ManaDisplay, TimeDisplay: fmt/fmtDec imports → @/lib/game/stores - SkillsTab, SkillRow, SkillUpgradeDialog: imports → @/lib/game/stores - StatsTab and sub-components: fmt/fmtDec imports → @/lib/game/stores - CategorySkillsList: GameStore type import → GameCoordinatorStore - EnchantmentDesigner types/utils: GameStore type imports → GameCoordinatorStore - Header: fmt import → @/lib/game/stores Moves remaining non-hook usage files from legacy @/lib/game/store to modular @/lib/game/stores --- src/components/game/CraftingProgress.tsx | 2 +- src/components/game/ManaDisplay.tsx | 2 +- src/components/game/SkillsTab.tsx | 2 +- src/components/game/SkillsTab/SkillRow.tsx | 2 +- src/components/game/SkillsTab/SkillUpgradeDialog.tsx | 2 +- src/components/game/StatsTab.tsx | 2 +- src/components/game/StatsTab/CombatStatsSection.tsx | 4 ++-- src/components/game/StatsTab/ElementStatsSection.tsx | 2 +- src/components/game/StatsTab/LoopStatsSection.tsx | 2 +- src/components/game/StatsTab/ManaStatsSection.tsx | 2 +- src/components/game/StatsTab/PactStatusSection.tsx | 2 +- src/components/game/StatsTab/StudyStatsSection.tsx | 2 +- src/components/game/TimeDisplay.tsx | 2 +- src/components/game/crafting/EnchantmentDesigner/types.ts | 2 +- src/components/game/crafting/EnchantmentDesigner/utils.ts | 2 +- src/components/game/layout/Header.tsx | 2 +- src/components/game/tabs/CategorySkillsList.tsx | 2 +- 17 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/components/game/CraftingProgress.tsx b/src/components/game/CraftingProgress.tsx index a1596a0..4ea64ee 100755 --- a/src/components/game/CraftingProgress.tsx +++ b/src/components/game/CraftingProgress.tsx @@ -3,7 +3,7 @@ import { Button } from '@/components/ui/button'; import { Progress } from '@/components/ui/progress'; import { Target, FlaskConical, Sparkles, Play, Pause, X } from 'lucide-react'; -import { fmt } from '@/lib/game/store'; +import { fmt } from '@/lib/game/stores'; import { formatStudyTime } from '@/lib/game/formatting'; import type { EquipmentInstance, EnchantmentDesign } from '@/lib/game/types'; diff --git a/src/components/game/ManaDisplay.tsx b/src/components/game/ManaDisplay.tsx index 3a3246f..460d7a2 100755 --- a/src/components/game/ManaDisplay.tsx +++ b/src/components/game/ManaDisplay.tsx @@ -4,7 +4,7 @@ import { Button } from '@/components/ui/button'; import { Progress } from '@/components/ui/progress'; import { Card, CardContent } from '@/components/ui/card'; import { Zap, ChevronDown, ChevronUp } from 'lucide-react'; -import { fmt, fmtDec } from '@/lib/game/store'; +import { fmt, fmtDec } from '@/lib/game/stores'; import { ELEMENTS } from '@/lib/game/constants'; import { useState } from 'react'; diff --git a/src/components/game/SkillsTab.tsx b/src/components/game/SkillsTab.tsx index ec48352..5d59b46 100755 --- a/src/components/game/SkillsTab.tsx +++ b/src/components/game/SkillsTab.tsx @@ -1,7 +1,7 @@ 'use client'; import { useState } from 'react'; -import { useGameStore } from '@/lib/game/store'; +import { useGameStore } from '@/lib/game/stores'; import { SKILL_CATEGORIES } from '@/lib/game/constants'; import { Card, CardContent } from '@/components/ui/card'; import { SkillUpgradeDialog } from './SkillsTab/SkillUpgradeDialog'; diff --git a/src/components/game/SkillsTab/SkillRow.tsx b/src/components/game/SkillsTab/SkillRow.tsx index 66df16a..adc7bfb 100644 --- a/src/components/game/SkillsTab/SkillRow.tsx +++ b/src/components/game/SkillsTab/SkillRow.tsx @@ -1,6 +1,6 @@ 'use client'; -import { useGameStore, fmt, fmtDec } from '@/lib/game/store'; +import { useGameStore, fmt, fmtDec } from '@/lib/game/stores'; import { SKILLS_DEF, SKILL_CATEGORIES } from '@/lib/game/constants'; import { getNextTierSkill, getTierMultiplier } from '@/lib/game/skill-evolution'; import { computeEffects } from '@/lib/game/upgrade-effects'; diff --git a/src/components/game/SkillsTab/SkillUpgradeDialog.tsx b/src/components/game/SkillsTab/SkillUpgradeDialog.tsx index 41d80d4..a020c67 100644 --- a/src/components/game/SkillsTab/SkillUpgradeDialog.tsx +++ b/src/components/game/SkillsTab/SkillUpgradeDialog.tsx @@ -1,7 +1,7 @@ 'use client'; import { useState } from 'react'; -import { useGameStore, fmt } from '@/lib/game/store'; +import { useGameStore, fmt } from '@/lib/game/stores'; import { SKILLS_DEF } from '@/lib/game/constants'; import { Badge } from '@/components/ui/badge'; import { Button } from '@/components/ui/button'; diff --git a/src/components/game/StatsTab.tsx b/src/components/game/StatsTab.tsx index 235d772..db81b85 100755 --- a/src/components/game/StatsTab.tsx +++ b/src/components/game/StatsTab.tsx @@ -1,6 +1,6 @@ 'use client'; -import { useGameStore, fmt, fmtDec } from '@/lib/game/store'; +import { useGameStore, fmt, fmtDec } from '@/lib/game/stores'; import { ELEMENTS } from '@/lib/game/constants'; import { SKILL_EVOLUTION_PATHS, getTierMultiplier } from '@/lib/game/skill-evolution'; import { useManaStats, useCombatStats, useStudyStats } from '@/lib/game/hooks/useGameDerived'; diff --git a/src/components/game/StatsTab/CombatStatsSection.tsx b/src/components/game/StatsTab/CombatStatsSection.tsx index 2a422f5..3a27bd4 100644 --- a/src/components/game/StatsTab/CombatStatsSection.tsx +++ b/src/components/game/StatsTab/CombatStatsSection.tsx @@ -2,8 +2,8 @@ import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'; import { Swords } from 'lucide-react'; -import type { GameStore } from '@/lib/game/store'; -import { fmt, fmtDec } from '@/lib/game/store'; +import type { GameStore } from '@/lib/game/stores'; +import { fmt, fmtDec } from '@/lib/game/stores'; import { getUnifiedEffects } from '@/lib/game/effects'; interface CombatStatsSectionProps { diff --git a/src/components/game/StatsTab/ElementStatsSection.tsx b/src/components/game/StatsTab/ElementStatsSection.tsx index 0f8e8b0..f97e401 100644 --- a/src/components/game/StatsTab/ElementStatsSection.tsx +++ b/src/components/game/StatsTab/ElementStatsSection.tsx @@ -5,7 +5,7 @@ import { Separator } from '@/components/ui/separator'; import { FlaskConical } from 'lucide-react'; import { ELEMENTS } from '@/lib/game/constants'; import { getTierMultiplier } from '@/lib/game/skill-evolution'; -import { fmt, fmtDec } from '@/lib/game/store'; +import { fmt, fmtDec } from '@/lib/game/stores'; interface ElementStatsSectionProps { store: any; diff --git a/src/components/game/StatsTab/LoopStatsSection.tsx b/src/components/game/StatsTab/LoopStatsSection.tsx index 1987d1c..e97f816 100644 --- a/src/components/game/StatsTab/LoopStatsSection.tsx +++ b/src/components/game/StatsTab/LoopStatsSection.tsx @@ -3,7 +3,7 @@ import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'; import { Separator } from '@/components/ui/separator'; import { RotateCcw } from 'lucide-react'; -import { fmt } from '@/lib/game/store'; +import { fmt } from '@/lib/game/stores'; interface LoopStatsSectionProps { store: any; diff --git a/src/components/game/StatsTab/ManaStatsSection.tsx b/src/components/game/StatsTab/ManaStatsSection.tsx index 30ed7d2..b832c38 100644 --- a/src/components/game/StatsTab/ManaStatsSection.tsx +++ b/src/components/game/StatsTab/ManaStatsSection.tsx @@ -1,6 +1,6 @@ 'use client'; -import { fmt, fmtDec } from '@/lib/game/store'; +import { fmt, fmtDec } from '@/lib/game/stores'; import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'; import { Droplet } from 'lucide-react'; import type { SkillUpgradeChoice } from '@/lib/game/types'; diff --git a/src/components/game/StatsTab/PactStatusSection.tsx b/src/components/game/StatsTab/PactStatusSection.tsx index 7871aab..cf4d389 100644 --- a/src/components/game/StatsTab/PactStatusSection.tsx +++ b/src/components/game/StatsTab/PactStatusSection.tsx @@ -2,7 +2,7 @@ import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'; import { Trophy } from 'lucide-react'; -import { fmtDec } from '@/lib/game/store'; +import { fmtDec } from '@/lib/game/stores'; import { ELEMENTS } from '@/lib/game/constants'; interface PactStatusSectionProps { diff --git a/src/components/game/StatsTab/StudyStatsSection.tsx b/src/components/game/StatsTab/StudyStatsSection.tsx index 437504e..4fc4e2e 100644 --- a/src/components/game/StatsTab/StudyStatsSection.tsx +++ b/src/components/game/StatsTab/StudyStatsSection.tsx @@ -2,7 +2,7 @@ import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'; import { BookOpen } from 'lucide-react'; -import { fmtDec } from '@/lib/game/store'; +import { fmtDec } from '@/lib/game/stores'; interface StudyStatsSectionProps { studySpeedMult: number; diff --git a/src/components/game/TimeDisplay.tsx b/src/components/game/TimeDisplay.tsx index 3d49f8a..346b99d 100755 --- a/src/components/game/TimeDisplay.tsx +++ b/src/components/game/TimeDisplay.tsx @@ -1,6 +1,6 @@ 'use client'; -import { fmt } from '@/lib/game/store'; +import { fmt } from '@/lib/game/stores'; import { formatHour } from '@/lib/game/formatting'; interface TimeDisplayProps { diff --git a/src/components/game/crafting/EnchantmentDesigner/types.ts b/src/components/game/crafting/EnchantmentDesigner/types.ts index 72e521f..05a6466 100644 --- a/src/components/game/crafting/EnchantmentDesigner/types.ts +++ b/src/components/game/crafting/EnchantmentDesigner/types.ts @@ -1,5 +1,5 @@ import type { EquipmentInstance, EnchantmentDesign, DesignEffect, EquipmentCraftingProgress, EquipmentCategory } from '@/lib/game/types'; -import type { GameStore } from '@/lib/game/store'; +import type { GameStore } from '@/lib/game/stores'; export interface EnchantmentDesignerProps { store: GameStore; diff --git a/src/components/game/crafting/EnchantmentDesigner/utils.ts b/src/components/game/crafting/EnchantmentDesigner/utils.ts index b1574ad..fd79da3 100644 --- a/src/components/game/crafting/EnchantmentDesigner/utils.ts +++ b/src/components/game/crafting/EnchantmentDesigner/utils.ts @@ -1,7 +1,7 @@ import { EQUIPMENT_TYPES } from '@/lib/game/data/equipment'; import { ENCHANTMENT_EFFECTS, calculateEffectCapacityCost } from '@/lib/game/data/enchantment-effects'; import type { DesignEffect, EquipmentCategory } from '@/lib/game/types'; -import type { GameStore } from '@/lib/game/store'; +import type { GameStore } from '@/lib/game/stores'; /** * Get available effects for selected equipment type (only unlocked ones) diff --git a/src/components/game/layout/Header.tsx b/src/components/game/layout/Header.tsx index fe0edad..c48bd46 100644 --- a/src/components/game/layout/Header.tsx +++ b/src/components/game/layout/Header.tsx @@ -1,6 +1,6 @@ 'use client'; -import { fmt } from '@/lib/game/store'; +import { fmt } from '@/lib/game/stores'; import { formatHour } from '@/lib/game/formatting'; import { TimeDisplay } from '@/components/game/TimeDisplay'; diff --git a/src/components/game/tabs/CategorySkillsList.tsx b/src/components/game/tabs/CategorySkillsList.tsx index fcc144c..65d7607 100644 --- a/src/components/game/tabs/CategorySkillsList.tsx +++ b/src/components/game/tabs/CategorySkillsList.tsx @@ -9,7 +9,7 @@ import { SKILLS_DEF, getTierMultiplier } from '@/lib/game/constants'; import { getUnifiedEffects } from '@/lib/game/effects'; import { useSkillStore, useGameStore, usePrestigeStore } from '@/lib/game/stores'; import { SkillRow } from './SkillRow'; -import type { GameStore } from '@/lib/game/store'; // Keep type import for backward compatibility +import type { GameStore } from '@/lib/game/stores'; // Keep type import for backward compatibility interface CategorySkillsListProps { categoryId: string;