mirror of
https://github.com/pezkuwichain/pezkuwi-telemetry.git
synced 2026-06-20 05:51:05 +00:00
Fix tab switching
This commit is contained in:
@@ -76,15 +76,12 @@ export default class App extends React.Component<{}, State> {
|
|||||||
let index = 0;
|
let index = 0;
|
||||||
|
|
||||||
if (subscribed) {
|
if (subscribed) {
|
||||||
index = chains.indexOf(subscribed);
|
index = (chains.indexOf(subscribed) + 1) % chains.length;
|
||||||
|
|
||||||
// Do nothing if it's the same chain
|
// Do nothing if it's the same chain
|
||||||
if (chains[index] === subscribed) {
|
if (chains[index] === subscribed) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Go to next tab
|
|
||||||
index = (index + 1) % chains.length;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.connection.then((connection) => {
|
this.connection.then((connection) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user