Skip to content

Refactor GameDetailPage for improved state management and media handling#197

Merged
Stivenjs merged 1 commit into
mainfrom
console-mode
May 19, 2026
Merged

Refactor GameDetailPage for improved state management and media handling#197
Stivenjs merged 1 commit into
mainfrom
console-mode

Conversation

@Stivenjs
Copy link
Copy Markdown
Owner

This pull request refactors the GameDetailPage component to improve how media assets and game data are handled during game installation. The changes simplify state management for the install modal, remove unnecessary image handling from the state, and introduce a new approach for passing media data. Additionally, there is a minor workflow adjustment in the release process.

Game install modal improvements:

  • The installingFromSource state in GameDetailPage.tsx is simplified to only track the size property, removing the previously included image property. [1] [2]
  • Media data for the install modal is now prepared using a useMemo hook (installModalMediaBySteamAppId), which constructs a record of media assets keyed by Steam App ID. This is passed to the InstallModal component instead of a single image. [1] [2] [3]
  • The InstallModal is now rendered only if both installingFromSource and game are present, and it receives the new game and mediaBySteamAppId props instead of gameImage.

Code cleanup:

  • Removed unused import of getGameImageUrl from @utils/gameImage in GameDetailPage.tsx.
  • Added import of useMemo and SteamAppdetailsMediaResult for improved type safety and memoization. [1] [2]

Workflow update:

  • In .github/workflows/release.yml, the generate_release_notes: true option is removed from the GitHub release action, likely to prevent automatic generation of release notes.

…ia handling

- Refactored state management for installingFromSource to simplify structure and improve clarity.
- Introduced useMemo for installModalMediaBySteamAppId to optimize media data handling.
- Cleaned up import statements and removed unused variables for better code organization.
- Adjusted conditional rendering of InstallModal to ensure proper game data is passed.
@Stivenjs Stivenjs self-assigned this May 19, 2026
@Stivenjs Stivenjs added the enhancement New feature or request label May 19, 2026
@Stivenjs Stivenjs merged commit ffb7d79 into main May 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant