fix(core advance example): display right state (#406)
This commit is contained in:
parent
5c0e4fad11
commit
7522d25557
1 changed files with 4 additions and 1 deletions
|
@ -51,7 +51,10 @@ export function Toolbar({ activeStates, lastEvent }: ToolbarProps) {
|
|||
<button onClick={onReset}>Reset</button>
|
||||
{activeStates
|
||||
.slice(1)
|
||||
.map((name) => name.split('#state_1.root')[1])
|
||||
.map((name) => {
|
||||
const state = name.split('.')
|
||||
return state[state.length - 1]
|
||||
})
|
||||
.join(' - ')}
|
||||
</div>
|
||||
<div>{lastEvent}</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue