Skip to content

[FIX] Idle income stops when navigating away from the Index page #3

@MrJacob12

Description

@MrJacob12

The game loop logic (seed generation via setInterval) is currently implemented inside
the Index.tsx page component. This causes the income generation to cease whenever the
user navigates to other routes like /packs or /collection. In an idle game, progress
should be global and persistent regardless of the active view.

Tasks:

  • Move the setInterval logic from src/pages/Index.tsx to a global location (e.g.,
    App.tsx or a custom useGameLoop hook).
  • Ensure the game loop starts on application mount and persists across all routes.
  • Verify that updateSeeds is called correctly from the global context.

Metadata

Metadata

Assignees

Labels

BUGSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions