Always display imported & exported on peer

Peers are bi-directional, we need to reflect that
This commit is contained in:
Michael Klein 2022-10-09 13:00:00 +02:00
parent 7fe7ecfeda
commit b356cffbc5
1 changed files with 10 additions and 13 deletions

View File

@ -17,19 +17,16 @@ export default class PeeringsProvider extends Component {
const { router } = this;
const owner = getOwner(this);
let tabs;
if (peer.isDialer) {
tabs = [
let tabs = [
{ label: 'Imported Services', route: 'dc.peers.edit.imported' },
{
label: 'Exported Services',
route: 'dc.peers.edit.exported',
},
];
} else {
tabs = [
{ label: 'Imported Services', route: 'dc.peers.edit.imported' },
{ label: 'Addresses', route: 'dc.peers.edit.addresses' },
];
if (!peer.isReceiver) {
tabs = [...tabs, { label: 'Addresses', route: 'dc.peers.edit.addresses' }];
}
return tabs.map((tab) => new Tab({ ...tab, currentRouteName: router.currentRouteName, owner }));