Fixed issue with copying snippets. Added Changelog file

This commit is contained in:
unknown
2021-09-24 10:50:22 +02:00
parent ff6071e524
commit f8bc749017
6 changed files with 17 additions and 3 deletions

View File

@@ -6,6 +6,7 @@ import { Badge, Button, Card } from '../UI';
import { SnippetsContext } from '../../store';
import Icon from '@mdi/react';
import { mdiPin } from '@mdi/js';
import copy from 'clipboard-copy';
interface Props {
snippet: Snippet;
@@ -17,7 +18,7 @@ export const SnippetCard = (props: Props): JSX.Element => {
const { setSnippet } = useContext(SnippetsContext);
const copyHandler = () => {
navigator.clipboard.writeText(code);
copy(code);
};
return (

View File

@@ -6,6 +6,7 @@ import { dateParser } from '../../utils';
import { Button, Card } from '../UI';
import Icon from '@mdi/react';
import { mdiPin } from '@mdi/js';
import copy from 'clipboard-copy';
interface Props {
snippet: Snippet;
@@ -30,7 +31,7 @@ export const SnippetDetails = (props: Props): JSX.Element => {
const updateDate = dateParser(updatedAt);
const copyHandler = () => {
navigator.clipboard.writeText(code);
copy(code);
};
return (