fix: remaining tab migrations to modular stores
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m24s
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m24s
- 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
This commit is contained in:
@@ -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';
|
||||
|
||||
|
||||
@@ -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';
|
||||
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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';
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user