From ccb5cb4cb736baf141c3c53550439b641c81a78b Mon Sep 17 00:00:00 2001
From: Bastien Dumont <bdumont@grandlyon.com>
Date: Tue, 18 Apr 2023 16:08:59 +0200
Subject: [PATCH] remove duplicate props declaration

---
 src/components/Newsletter/CustomEditor.tsx              | 2 +-
 src/components/Newsletter/CustomLink.tsx                | 5 +----
 src/components/Newsletter/DateSelector/DateSelector.tsx | 2 +-
 src/components/Newsletter/ImagePicker/SingleImage.tsx   | 2 +-
 src/components/Newsletter/Poll/Poll.tsx                 | 2 +-
 src/components/Prices/PriceRow.tsx                      | 4 ++--
 src/components/Prices/PriceSection.tsx                  | 5 +----
 7 files changed, 8 insertions(+), 14 deletions(-)

diff --git a/src/components/Newsletter/CustomEditor.tsx b/src/components/Newsletter/CustomEditor.tsx
index a481848f..5e0bfa08 100644
--- a/src/components/Newsletter/CustomEditor.tsx
+++ b/src/components/Newsletter/CustomEditor.tsx
@@ -18,7 +18,7 @@ const CustomEditor: React.FC<CustomEditorProps> = ({
   baseState,
   handleChange,
   editorType,
-}: CustomEditorProps) => {
+}) => {
   const [editorState, setEditorState] = useState<EditorState>(baseState)
 
   const convertStateToHTML = (state: EditorState) => {
diff --git a/src/components/Newsletter/CustomLink.tsx b/src/components/Newsletter/CustomLink.tsx
index 62ec611a..fc69ff89 100644
--- a/src/components/Newsletter/CustomLink.tsx
+++ b/src/components/Newsletter/CustomLink.tsx
@@ -11,10 +11,7 @@ interface LinkState {
   link: string
 }
 
-const CustomLink: React.FC<EcolyoLinkProps> = ({
-  onChange,
-  editorState,
-}: EcolyoLinkProps) => {
+const CustomLink: React.FC<EcolyoLinkProps> = ({ onChange, editorState }) => {
   const [open, setOpen] = useState<boolean>(false)
   const links: LinkState[] = [
     {
diff --git a/src/components/Newsletter/DateSelector/DateSelector.tsx b/src/components/Newsletter/DateSelector/DateSelector.tsx
index 871b319a..e811fc65 100644
--- a/src/components/Newsletter/DateSelector/DateSelector.tsx
+++ b/src/components/Newsletter/DateSelector/DateSelector.tsx
@@ -14,7 +14,7 @@ const DateSelector: React.FC<DateSelectorProps> = ({
   date,
   setDate,
   isEmpty,
-}: DateSelectorProps) => {
+}) => {
   const [openModal, setOpenModal] = useState<boolean>(false)
   const [isPrev, setIsPrev] = useState<boolean>(false)
   const toggleOpenModal = () => setOpenModal((prev) => !prev)
diff --git a/src/components/Newsletter/ImagePicker/SingleImage.tsx b/src/components/Newsletter/ImagePicker/SingleImage.tsx
index 94d2f5c6..9de3d93d 100644
--- a/src/components/Newsletter/ImagePicker/SingleImage.tsx
+++ b/src/components/Newsletter/ImagePicker/SingleImage.tsx
@@ -10,7 +10,7 @@ const SingleImage: React.FC<SingleImageProps> = ({
   imageURL,
   selectedImage,
   setSelectedImageURL,
-}: SingleImageProps) => {
+}) => {
   const selectImage = (targetImage: string) => {
     setSelectedImageURL(targetImage)
   }
diff --git a/src/components/Newsletter/Poll/Poll.tsx b/src/components/Newsletter/Poll/Poll.tsx
index 4b880f99..24e0d371 100644
--- a/src/components/Newsletter/Poll/Poll.tsx
+++ b/src/components/Newsletter/Poll/Poll.tsx
@@ -24,7 +24,7 @@ const Poll: React.FC<PollProps> = ({
   onSave,
   onCancel,
   onDelete,
-}: PollProps) => {
+}) => {
   const handleChangeLink = (e: ChangeEvent<HTMLInputElement>) => {
     handleChange(e.target.value, 'link')
   }
diff --git a/src/components/Prices/PriceRow.tsx b/src/components/Prices/PriceRow.tsx
index d3e5b0d0..b2df90bf 100644
--- a/src/components/Prices/PriceRow.tsx
+++ b/src/components/Prices/PriceRow.tsx
@@ -1,6 +1,6 @@
 import React from 'react'
-import { IPrice } from '../../models/price.model'
 import editing from '../../assets/icons/editing.png'
+import { IPrice } from '../../models/price.model'
 
 interface PriceSectionProps {
   getDate: (date: string) => string
@@ -20,7 +20,7 @@ const PriceRow: React.FC<PriceSectionProps> = ({
   prices,
   index,
   isNextPrice,
-}: PriceSectionProps) => {
+}) => {
   const editableLimit: number = 3
 
   return (
diff --git a/src/components/Prices/PriceSection.tsx b/src/components/Prices/PriceSection.tsx
index bf2c1316..317d938a 100644
--- a/src/components/Prices/PriceSection.tsx
+++ b/src/components/Prices/PriceSection.tsx
@@ -22,10 +22,7 @@ interface PriceSectionProps {
   frequency: FrequencyInMonth
 }
 
-const PriceSection: React.FC<PriceSectionProps> = ({
-  fluid,
-  frequency,
-}: PriceSectionProps) => {
+const PriceSection: React.FC<PriceSectionProps> = ({ fluid, frequency }) => {
   const [prices, setPrices] = useState<IPrice[]>([])
   const [nextPrice, setNextPrice] = useState<IPrice>()
   const [isLoading, setIsLoading] = useState<boolean>(false)
-- 
GitLab