🧹🚧DOC-97 DOC-19

This commit is contained in:
Timur Ercan
2023-02-21 11:19:31 +01:00
parent f3e083e991
commit 2176511ef7
7 changed files with 16 additions and 22 deletions

View File

@ -1,10 +1,7 @@
import { ResizableBox, ResizeCallbackData } from "react-resizable";
import React, { SyntheticEvent, useEffect, useState } from "react";
import React, { useState } from "react";
import Draggable from "react-draggable";
import { CircleStackIcon, TrashIcon } from "@heroicons/react/24/solid";
import Logo from "../logo";
import { IconButton } from "@documenso/ui";
import toast from "react-hot-toast";
import { XCircleIcon } from "@heroicons/react/20/solid";
const stc = require("string-to-color");
@ -20,6 +17,7 @@ type FieldPropsType = {
};
onPositionChanged: any;
onDelete: any;
hidden: boolean;
};
export default function EditableField(props: FieldPropsType) {
@ -52,6 +50,7 @@ export default function EditableField(props: FieldPropsType) {
cancel="strong"
>
<div
hidden={props.hidden}
ref={nodeRef}
className="cursor-move opacity-80 p-2 m-auto w-auto flex-row-reverse text-lg font-bold text-center absolute top-0 left-0 select-none"
style={{

View File

@ -37,7 +37,6 @@ export default function PDFEditor(props: any) {
function onDeleteHandler(id: any) {
const field = fields.find((e) => e.id == id);
const fieldIndex = fields.map((item) => item.id).indexOf(id);
console.log(fieldIndex);
if (fieldIndex > -1) {
const fieldWithoutRemoved = [...fields];
const removedField = fieldWithoutRemoved.splice(fieldIndex, 1);

View File

@ -71,6 +71,7 @@ export default function PDFViewer(props) {
></ReadOnlyField>
) : (
<EditableField
hidden={item.Signature}
key={item.id}
field={item}
className="absolute"