From 712837c3fbec656cba0c3414de6910d28642a5c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20Mart=C3=ADnez?= Date: Wed, 13 Sep 2023 03:58:45 -0500 Subject: [PATCH] Order the action buttons (#394) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Order the action buttons * bump version --------- Co-authored-by: mjadach-iv <104129084+mjadach-iv@users.noreply.github.com> Co-authored-by: MichaƂ Jadach --- package.json | 2 +- .../Modal/node/OpenOrFundChannelModal.tsx | 26 +++++++++---------- src/pages/node/aliases.tsx | 9 +++++-- 3 files changed, 21 insertions(+), 16 deletions(-) diff --git a/package.json b/package.json index 211b7584..e94e3715 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hopr-admin", - "version": "0.6.0", + "version": "0.6.1", "private": true, "dependencies": { "@emotion/react": "^11.11.0", diff --git a/src/components/Modal/node/OpenOrFundChannelModal.tsx b/src/components/Modal/node/OpenOrFundChannelModal.tsx index 6912ece8..7993c212 100644 --- a/src/components/Modal/node/OpenOrFundChannelModal.tsx +++ b/src/components/Modal/node/OpenOrFundChannelModal.tsx @@ -118,22 +118,22 @@ export const OpenOrFundChannelModal = ({ iconComponent={icon()} disabled={type === 'fund'} tooltipText={ - type === 'fund' ? - - FUND -
- function not avalible yet -
- : - modalBtnText ? ( - modalBtnText - ) : ( + type === 'fund' ? - OPEN + FUND
- outgoing channel + function not avalible yet
- ) + : + modalBtnText ? ( + modalBtnText + ) : ( + + OPEN +
+ outgoing channel +
+ ) } onClick={handleOpenChannelDialog} /> diff --git a/src/pages/node/aliases.tsx b/src/pages/node/aliases.tsx index 183ffeee..e5a2ad3a 100644 --- a/src/pages/node/aliases.tsx +++ b/src/pages/node/aliases.tsx @@ -115,6 +115,11 @@ function AliasesPage() { } }; + const getPeerAddressFromPeerId = (peerId: string): string | undefined => { + const peerAddress = peers?.announced.find(peer => peer.peerId === peerId)?.peerAddress; + return peerAddress; + } + const parsedTableData = Object.entries(aliases ?? {}).map(([alias, peerId], key) => { return { id: peerId, @@ -124,12 +129,12 @@ function AliasesPage() { peerAddress: getPeerAddressByPeerId(peerId) ?? '', actions: ( <> + - { set_deleteSuccess(true);