Open
Conversation
Fixes #1 Add functionality to create and manage decks with unique names, save to local storage, and switch between decks using tabs. * **src/App.tsx** - Add a prompt to ask the user for a deck name when creating a new deck. - Assign a default name "New Deck" if the user does not provide a name. - Save the new deck to local storage using `localStorage.setItem`. - Load decks from local storage on component mount using `localStorage.getItem`. * **src/components/DeckTab.tsx** - Add tabs for each deck for quick switching. - Display deck stats in a tabbed interface. * **src/App.spec.tsx** - Add tests for creating a new deck with a unique name. - Add tests for saving the deck to local storage. - Add tests for loading decks from local storage on component mount. --- For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/acezard/warpforge-tracker/issues/1?shareId=XXXX-XXXX-XXXX-XXXX).
* Add `Tabs` and `Tab` components to `src/App.tsx` to allow switching between decks * Update `src/components/DeckTab.tsx` to show all warlords for the current deck on screen * Add tests in `src/App.spec.tsx` for showing only one deck per tab
* Add a new `Faction` type import * Map over `deck.factions` to create a table row for each faction * Add a table cell with the faction name, spanning all columns * Map over `faction.warlords` to create a table row for each warlord * Apply color-coded styles to columns for offensive wins, offensive losses, defensive wins, defensive losses, total wins, total losses, and win rate
deeDude
approved these changes
Feb 22, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1
Add functionality to create and manage decks with unique names, save to local storage, and switch between decks using tabs.
src/App.tsx
localStorage.setItem.localStorage.getItem.src/components/DeckTab.tsx
src/App.spec.tsx
For more details, open the Copilot Workspace session.