Improved code styling

This commit is contained in:
ireic
2019-12-24 16:39:03 +01:00
parent 4941261251
commit 3c705a6084
81 changed files with 671 additions and 583 deletions

View File

@@ -1,6 +1,6 @@
import React, { useState } from 'react';
import { copyToClipboard } from 'shared/utils/clipboard';
import { copyToClipboard } from 'shared/utils/browser';
import { Button } from 'shared/components';
const CopyLinkButton = ({ ...buttonProps }) => {
@@ -11,6 +11,7 @@ const CopyLinkButton = ({ ...buttonProps }) => {
setTimeout(() => setLinkCopied(false), 2000);
copyToClipboard(window.location.href);
};
return (
<Button icon="link" onClick={handleLinkCopy} {...buttonProps}>
{isLinkCopied ? 'Link Copied' : 'Copy link'}