Skip to content

Commit

Permalink
Order the action buttons (#394)
Browse files Browse the repository at this point in the history
* Order the action buttons

* bump version

---------

Co-authored-by: mjadach-iv <104129084+mjadach-iv@users.noreply.github.com>
Co-authored-by: Michał Jadach <sarah.smith@email.com>
  • Loading branch information
3 people authored Sep 13, 2023
1 parent 238e46d commit 712837c
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 16 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hopr-admin",
"version": "0.6.0",
"version": "0.6.1",
"private": true,
"dependencies": {
"@emotion/react": "^11.11.0",
Expand Down
26 changes: 13 additions & 13 deletions src/components/Modal/node/OpenOrFundChannelModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -118,22 +118,22 @@ export const OpenOrFundChannelModal = ({
iconComponent={icon()}
disabled={type === 'fund'}
tooltipText={
type === 'fund' ?
<span>
FUND
<br />
function not avalible yet
</span>
:
modalBtnText ? (
modalBtnText
) : (
type === 'fund' ?
<span>
OPEN
FUND
<br />
outgoing channel
function not avalible yet
</span>
)
:
modalBtnText ? (
modalBtnText
) : (
<span>
OPEN
<br />
outgoing channel
</span>
)
}
onClick={handleOpenChannelDialog}
/>
Expand Down
9 changes: 7 additions & 2 deletions src/pages/node/aliases.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -124,12 +129,12 @@ function AliasesPage() {
peerAddress: getPeerAddressByPeerId(peerId) ?? '',
actions: (
<>
<PingModal peerId={peerId} />
<OpenOrFundChannelModal
peerAddress={getPeerAddressByPeerId(peerId)} // FIXME: peerId should be peerAddress here
peerAddress={getPeerAddressByPeerId(peerId)}
type={'open'}
/>
<SendMessageModal peerId={peerId} />
<PingModal peerId={peerId} />
<DeleteAliasButton
onSuccess={() => {
set_deleteSuccess(true);
Expand Down

0 comments on commit 712837c

Please sign in to comment.