-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #56 from ChainSafe/lykhoyda/receive
Receive & Transaction history page
- Loading branch information
Showing
36 changed files
with
1,236 additions
and
223 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
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
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
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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
42 changes: 42 additions & 0 deletions
42
packages/web-wallet/src/components/CopyButton/CopyButton.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,42 @@ | ||
import React, { useState } from 'react'; | ||
|
||
interface CopyButtonProps { | ||
textToCopy: string; | ||
} | ||
|
||
const HIDE_IN_SECONDS = 2000; | ||
|
||
const CopyButton: React.FC<CopyButtonProps> = ({ textToCopy }) => { | ||
const [copied, setCopied] = useState(false); | ||
|
||
const handleCopy = async () => { | ||
try { | ||
await navigator.clipboard.writeText(textToCopy); | ||
setCopied(true); | ||
setTimeout(() => setCopied(false), HIDE_IN_SECONDS); | ||
} catch (err) { | ||
console.error('Failed to copy text:', err); | ||
} | ||
}; | ||
|
||
return ( | ||
<div className="relative inline-block"> | ||
{copied && ( | ||
<div | ||
className="absolute bottom-full left-1/2 transform -translate-x-1/2 text-white px-2 py-2 rounded-3xl mb-1 whitespace-nowrap text-sm | ||
bg-neutral-800 justify-center items-center gap-2.5 inline-flex" | ||
> | ||
Address copied! | ||
</div> | ||
)} | ||
<button | ||
onClick={handleCopy} | ||
className="text-[#e27625] text-base font-semibold leading-normal" | ||
> | ||
copy | ||
</button> | ||
</div> | ||
); | ||
}; | ||
|
||
export default CopyButton; |
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
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
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,13 @@ | ||
import React from 'react'; | ||
|
||
const Loader: React.FC = () => { | ||
return ( | ||
<div className={`flex justify-center items-center`}> | ||
<div | ||
className={`w-8 h-8 border-4 border-t-transparent border-gray-300 rounded-full animate-spin`} | ||
/> | ||
</div> | ||
); | ||
}; | ||
|
||
export default Loader; |
Oops, something went wrong.
0535f55
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.
🎉 Published on https://webz-demo.netlify.app as production
🚀 Deployed on https://6790d47c26c4e26f513b8a6d--webz-demo.netlify.app