-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* moved global css files to _app.tsx * latest fixes * reviewed changes * no confidence vote for both votes added * removed old project page * blocked unauthorized users fron applications and projects * reviewed changes * fixed no confidence vote list * build fixes * removed briefs/id/applications page * refund flow optimization * blocked unauthorized brief owners from applications
- Loading branch information
Showing
24 changed files
with
303 additions
and
1,774 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import { Alert } from '@mui/material'; | ||
import React, { ReactNode, useState } from 'react'; | ||
|
||
|
||
interface CopyToClipboardProps { | ||
link: string; | ||
title: string; | ||
children: ReactNode; | ||
extraClass?: string; | ||
} | ||
|
||
const CopyToClipboardToast = (props: CopyToClipboardProps) => { | ||
const { link, title, children, extraClass } = props; | ||
const [copied, setCopied] = useState<string>(''); | ||
|
||
const copyToClipboard = () => { | ||
const textToCopy = link || ''; | ||
|
||
navigator.clipboard.writeText(textToCopy); | ||
setCopied(title); | ||
|
||
setTimeout(() => { | ||
setCopied(''); | ||
}, 3000); | ||
}; | ||
|
||
return ( | ||
<div className='inline'> | ||
<div | ||
className={`fixed ${extraClass || "top-5"} z-10 transform duration-300 transition-all ${copied ? 'right-5' : '-right-full' | ||
}`} | ||
> | ||
<Alert severity='success'>{`${copied} Copied to clipboard`}</Alert> | ||
</div> | ||
|
||
<div className='inline cursor-pointer' onClick={copyToClipboard}> | ||
{children} | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default CopyToClipboardToast; |
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
Oops, something went wrong.