Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const SuccessAddToken: React.FC = ({ tokenValue, onConfirm }) => {
const { t } = useTranslation();
const [isCopied, setCopied] = useClipboard(tokenValue);
return (
{t('REPOSITORIES_SCREEN.TOKEN_SUCCESS')}
{tokenValue}
const SuccessAddToken: React.FC = ({ tokenValue, onConfirm }) => {
const { t } = useTranslation();
const [isCopied, setCopied] = useClipboard(tokenValue);
return (
{t('WORKSPACES_SCREEN.TOKEN_SUCCESS')}
{tokenValue}
export const TokenName = ({ token }: Props) => {
const [showCopiedLabel, setShowCopiedLabel] = React.useState(false);
const [isCopied, setCopied] = useClipboard(token.key);
React.useEffect(() => {
let timer;
if (showCopiedLabel) {
timer = setTimeout(() => {
setShowCopiedLabel(false);
}, 3000);
}
return () => clearTimeout(timer);
}, [showCopiedLabel]);
return (
{