generated from nhcarrigan/template
fix: force sync before boss fight and surface challenge errors to UI (#64)
Closes #50 ## Summary - Calls `forceSync()` before every boss challenge so the server always fights against the player's live state (equipped items, upgrades, etc.) rather than a potentially stale snapshot - Adds a `bossError` state that captures and displays error messages from failed manual boss challenges in the boss panel, matching the existing `autoBossError` display pattern ✨ This PR was created with help from Hikari~ 🌸 Reviewed-on: #64 Co-authored-by: Hikari <hikari@nhcarrigan.com> Co-committed-by: Hikari <hikari@nhcarrigan.com>
This commit was merged in pull request #64.
This commit is contained in:
@@ -235,6 +235,7 @@ const BossPanel = (): JSX.Element => {
|
||||
toggleAutoBoss,
|
||||
autoBossLastResult,
|
||||
autoBossError,
|
||||
bossError,
|
||||
} = useGame();
|
||||
const [ challengingBossId, setChallengingBossId ] = useState<string | null>(
|
||||
null,
|
||||
@@ -362,6 +363,13 @@ const BossPanel = (): JSX.Element => {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{bossError === null
|
||||
? null
|
||||
: <p className="auto-boss-error">
|
||||
{"⚠️ "}
|
||||
{bossError}
|
||||
</p>
|
||||
}
|
||||
{autoBossError === null
|
||||
? null
|
||||
: <p className="auto-boss-error">
|
||||
|
||||
Reference in New Issue
Block a user