From fb1f8f62635ae8d8279b9586db6480ad12818c89 Mon Sep 17 00:00:00 2001
From: "deepsource-autofix[bot]"
<62050782+deepsource-autofix[bot]@users.noreply.github.com>
Date: Sun, 25 Aug 2024 07:02:12 +0000
Subject: [PATCH] refactor: remove extra closing tags
Components without children can be self-closed to avoid the unnecessary extra closing tag. In JSX, closing tags are required when the component has children example `...` and if there are no child component between these tags, then this component can be self closed using ``. It is recommended as it improves readability, and it is more compact to use self-closing for these types of components.
---
src/components/AdsComponent/index.tsx | 2 +-
src/pages/LiveEditor/BasicEditor.tsx | 8 ++++----
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/components/AdsComponent/index.tsx b/src/components/AdsComponent/index.tsx
index 6d077663f..b93cac133 100644
--- a/src/components/AdsComponent/index.tsx
+++ b/src/components/AdsComponent/index.tsx
@@ -26,7 +26,7 @@ const AdsComponent = () => {
data-ad-format="fluid"
data-ad-client="ca-pub-5832817025080991"
data-ad-slot="3270832720"
- >
+ />
>
);
};
diff --git a/src/pages/LiveEditor/BasicEditor.tsx b/src/pages/LiveEditor/BasicEditor.tsx
index d61df6052..1eb165887 100644
--- a/src/pages/LiveEditor/BasicEditor.tsx
+++ b/src/pages/LiveEditor/BasicEditor.tsx
@@ -77,9 +77,9 @@ const BasicEditor= () => {
setChecker(pre => ({...pre, settings: !pre.settings}))} alt='settings'/>
-
-
-
+