Skip to content

Commit

Permalink
fix(pou): Add timer for Copied
Browse files Browse the repository at this point in the history
  • Loading branch information
likita committed Mar 8, 2024
1 parent 70aab21 commit 30ac0ff
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { IconButton } from '@/components/IconButton/IconButton';
import { TitleHeader } from '@/components/TitleHeader/TitleHeader';
import { useAvatar } from '@/hooks/avatar';
import { useProofOfUs } from '@/hooks/proofOfUs';
Expand Down Expand Up @@ -134,9 +133,7 @@ export const AvatarEditor: FC<IProps> = ({ next }) => {
label="Say Cheese"
Append={() => (
<Link href="/user">
<IconButton>
<MonoClose />
</IconButton>
<MonoClose />
</Link>
)}
/>
Expand Down
10 changes: 10 additions & 0 deletions packages/apps/proof-of-us/src/components/ShareView/ShareView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,16 @@ export const ShareView: FC<IProps> = ({ prev, status }) => {
//updateStatus({ proofOfUsId: proofOfUs.proofOfUsId, status: 4 });
}, []);

useEffect(() => {
if (!isCopied) return;

const timer = setTimeout(() => {
setIsCopied(false);
}, 3000);

return () => clearTimeout(timer);
}, [isCopied]);

if (!proofOfUs || !account || !isMounted) return;

const handleCopy = () => {
Expand Down

0 comments on commit 30ac0ff

Please sign in to comment.