Skip to content

Commit

Permalink
feat(core): Expose raw subnet ID (#8877)
Browse files Browse the repository at this point in the history
  • Loading branch information
alanmquach committed Jan 30, 2021
1 parent 53a0102 commit 7d94b69
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion app/scripts/modules/core/src/subnet/SubnetTag.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React from 'react';
import { CopyToClipboard } from 'core/utils';
import { SubnetReader } from './subnet.read.service';

export interface ISubnetTagProps {
Expand All @@ -24,6 +25,12 @@ export class SubnetTag extends React.Component<ISubnetTagProps, ISubnetTagState>
}

public render() {
return <span className="subnet-tag">{this.state.subnetLabel}</span>;
const { subnetId } = this.props;
return (
<span className="subnet-tag">
{this.state.subnetLabel}
<CopyToClipboard text={subnetId} toolTip={`${subnetId} (click to copy)`} />
</span>
);
}
}

0 comments on commit 7d94b69

Please sign in to comment.