From 714c732f7aed24334180c6b7639d03f9d9b2e620 Mon Sep 17 00:00:00 2001 From: Saimon8420 Date: Tue, 31 Dec 2024 16:31:15 +0600 Subject: [PATCH] some unnecessary code removed from text-customizations --- .../Customization/TextCustomization.jsx | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/src/components/EachComponent/Customization/TextCustomization.jsx b/src/components/EachComponent/Customization/TextCustomization.jsx index 5e4e927..d9a885f 100644 --- a/src/components/EachComponent/Customization/TextCustomization.jsx +++ b/src/components/EachComponent/Customization/TextCustomization.jsx @@ -62,9 +62,9 @@ const TextCustomization = () => { } } - const updatePreview = (properties) => { - setPreviewText(text); - } + // const updatePreview = (properties) => { + // setPreviewText(text); + // } const applyChanges = () => { updateActiveObject({ @@ -83,57 +83,47 @@ const TextCustomization = () => { const handleTextChange = (newText) => { setText(newText); - updatePreview({ text: newText }); setPreviewText(newText); } const handleFontFamilyChange = (newFontFamily) => { setFontFamily(newFontFamily); - updatePreview({ fontFamily: newFontFamily }); } const handleFontSizeChange = (newFontSize) => { setFontSize(newFontSize) - updatePreview({ fontSize: newFontSize }) } const handleTextAlignChange = (newTextAlign) => { setTextAlign(newTextAlign) - updatePreview({ textAlign: newTextAlign }) } const handleFontStyleChange = () => { const newFontStyle = fontStyle === 'normal' ? 'italic' : 'normal' setFontStyle(newFontStyle) - updatePreview({ fontStyle: newFontStyle }) } const handleFontWeightChange = () => { const newFontWeight = fontWeight === 'normal' ? 'bold' : 'normal' setFontWeight(newFontWeight) - updatePreview({ fontWeight: newFontWeight }) } const handleLineHeightChange = (newLineHeight) => { setLineHeight(newLineHeight) - updatePreview({ lineHeight: newLineHeight }) } const handleCharSpacingChange = (newCharSpacing) => { setCharSpacing(newCharSpacing) - updatePreview({ charSpacing: newCharSpacing }) } const handleUnderlineChange = () => { const newUnderline = !underline setUnderline(newUnderline) - updatePreview({ underline: newUnderline }) } const handleLinethroughChange = () => { const newLinethrough = !linethrough setLinethrough(newLinethrough) - updatePreview({ linethrough: newLinethrough }) } const content = () => {