fix: set link default value to random (#192)

* fix: set link default value to random

* fix: add auto EOL and add conventional-changelog package

* feat: Adding reverse shares' shares a clickable link (#178)

* Add clickable link to reverse share's shares

* Ran format

* Apply suggestions from code review

* fix: set link default value to random (#181)

* fix: set link default value to random

* fix: add auto EOL and add conventional-changelog package

* Apply suggestions from code review

---------

Co-authored-by: Elias Schneider <login@eliasschneider.com>

* feat: Adding reverse share ability to copy the link (#179)

---------

Co-authored-by: Elias Schneider <login@eliasschneider.com>
This commit is contained in:
Pierre Bidet
2023-07-10 13:58:17 +02:00
committed by GitHub
parent adf0f8d57e
commit a1ea7c0265
12 changed files with 92 additions and 25 deletions

View File

@@ -1,8 +1,8 @@
import { useRef, useState } from "react";
import toast from "../../utils/toast.util";
import { ActionIcon, TextInput } from "@mantine/core";
import { TbCheck, TbCopy } from "react-icons/tb";
import { useClipboard } from "@mantine/hooks";
import { useRef, useState } from "react";
import { TbCheck, TbCopy } from "react-icons/tb";
import toast from "../../utils/toast.util";
function CopyTextField(props: { link: string }) {
const clipboard = useClipboard({ timeout: 500 });
@@ -14,7 +14,7 @@ function CopyTextField(props: { link: string }) {
const copyLink = () => {
clipboard.copy(props.link);
toast.success("Your link was copied to the keyboard.");
toast.success("The link was copied to your clipboard.");
if (timerRef.current) clearTimeout(timerRef.current);
timerRef.current = setTimeout(() => {
setCheckState(false);