diff --git a/frontend/components/EditLink/index.tsx b/frontend/components/EditLink/index.tsx deleted file mode 100644 index 5bc7b76..0000000 --- a/frontend/components/EditLink/index.tsx +++ /dev/null @@ -1,7 +0,0 @@ -import React from "react"; - -const EditLink: React.FC = () => { - return
; -}; - -export default EditLink; diff --git a/frontend/components/Editor/Link.tsx b/frontend/components/Editor/Link.tsx new file mode 100644 index 0000000..0fc0ba1 --- /dev/null +++ b/frontend/components/Editor/Link.tsx @@ -0,0 +1,92 @@ +import React, { useRef, useState } from "react"; +import { Draggable } from "react-beautiful-dnd"; + +export type EditableLink = { + title: string; + url: string; + active: boolean; + clicks: number; +}; + +interface LinkProps { + index: number; + link: EditableLink; + onChange: (newLink: EditableLink) => void; + onDelete: () => void; +} + +const DeleteIcon = () => ( + +); + +const DragIcon = () => ( + +); + +const Link: React.FC