-
Notifications
You must be signed in to change notification settings - Fork 232
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[xc_admin] print hex instead of number (#1256)
* print hex instead of number * rename copypubkey * add spaces
- Loading branch information
Dev Kalra
authored
Jan 29, 2024
1 parent
f7624d6
commit 6870209
Showing
4 changed files
with
55 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 0 additions & 23 deletions
23
governance/xc_admin/packages/xc_admin_frontend/components/common/CopyPubkey.tsx
This file was deleted.
Oops, something went wrong.
23 changes: 23 additions & 0 deletions
23
governance/xc_admin/packages/xc_admin_frontend/components/common/CopyText.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import copy from 'copy-to-clipboard' | ||
import CopyIcon from '../../images/icons/copy.inline.svg' | ||
|
||
const CopyText: React.FC<{ | ||
text: string | ||
}> = ({ text }) => { | ||
return ( | ||
<div | ||
className="-ml-1 inline-flex cursor-pointer items-center break-all px-1 hover:bg-dark hover:text-white active:bg-darkGray3" | ||
onClick={() => { | ||
copy(text) | ||
}} | ||
> | ||
<span className="mr-2 hidden xl:block">{text}</span> | ||
<span className="mr-2 xl:hidden"> | ||
{text.slice(0, 6) + '...' + text.slice(-6)} | ||
</span>{' '} | ||
<CopyIcon className="shrink-0" /> | ||
</div> | ||
) | ||
} | ||
|
||
export default CopyText |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6870209
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
xc-admin-frontend – ./
xc-admin-frontend-pyth-web.vercel.app
xc-admin-frontend.vercel.app
xc-admin-frontend-git-main-pyth-web.vercel.app