(item: ExplorerNavStackItem)
| 86 | |
| 87 | const push = // eslint-disable-line react-hooks/exhaustive-deps -- false positive, variable is optimized by react-compiler, no need to wrap with useCallback |
| 88 | (item: ExplorerNavStackItem) => { |
| 89 | setNavStack(currentState => { |
| 90 | const lastItem = currentState.at(-1)!; |
| 91 | return lastItem.def === item.def |
| 92 | ? // Avoid pushing duplicate items |
| 93 | currentState |
| 94 | : [...currentState, item]; |
| 95 | }); |
| 96 | }; |
| 97 | |
| 98 | const pop = () => { |
| 99 | setNavStack(currentState => |
no outgoing calls
no test coverage detected