Switch side panel to stat block when advancing turns
Previously the import/sources view would stay open when navigating to the next combatant. Now advancing turns clears those modes so the active creature's stat block is shown. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -259,6 +259,8 @@ export function App() {
|
|||||||
const active = encounter.combatants[encounter.activeIndex];
|
const active = encounter.combatants[encounter.activeIndex];
|
||||||
if (!active?.creatureId || !isLoaded) return;
|
if (!active?.creatureId || !isLoaded) return;
|
||||||
setSelectedCreatureId(active.creatureId as CreatureId);
|
setSelectedCreatureId(active.creatureId as CreatureId);
|
||||||
|
setBulkImportMode(false);
|
||||||
|
setSourceManagerMode(false);
|
||||||
}, [encounter.activeIndex, encounter.combatants, isLoaded]);
|
}, [encounter.activeIndex, encounter.combatants, isLoaded]);
|
||||||
|
|
||||||
const isEmpty = encounter.combatants.length === 0;
|
const isEmpty = encounter.combatants.length === 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user