Skip to content
Snippets Groups Projects
Commit ccb5cb4c authored by Bastien DUMONT's avatar Bastien DUMONT :angel:
Browse files

remove duplicate props declaration

parent 1b336ef6
No related branches found
No related tags found
1 merge request!99chore: fix typos
...@@ -18,7 +18,7 @@ const CustomEditor: React.FC<CustomEditorProps> = ({ ...@@ -18,7 +18,7 @@ const CustomEditor: React.FC<CustomEditorProps> = ({
baseState, baseState,
handleChange, handleChange,
editorType, editorType,
}: CustomEditorProps) => { }) => {
const [editorState, setEditorState] = useState<EditorState>(baseState) const [editorState, setEditorState] = useState<EditorState>(baseState)
const convertStateToHTML = (state: EditorState) => { const convertStateToHTML = (state: EditorState) => {
......
...@@ -11,10 +11,7 @@ interface LinkState { ...@@ -11,10 +11,7 @@ interface LinkState {
link: string link: string
} }
const CustomLink: React.FC<EcolyoLinkProps> = ({ const CustomLink: React.FC<EcolyoLinkProps> = ({ onChange, editorState }) => {
onChange,
editorState,
}: EcolyoLinkProps) => {
const [open, setOpen] = useState<boolean>(false) const [open, setOpen] = useState<boolean>(false)
const links: LinkState[] = [ const links: LinkState[] = [
{ {
......
...@@ -14,7 +14,7 @@ const DateSelector: React.FC<DateSelectorProps> = ({ ...@@ -14,7 +14,7 @@ const DateSelector: React.FC<DateSelectorProps> = ({
date, date,
setDate, setDate,
isEmpty, isEmpty,
}: DateSelectorProps) => { }) => {
const [openModal, setOpenModal] = useState<boolean>(false) const [openModal, setOpenModal] = useState<boolean>(false)
const [isPrev, setIsPrev] = useState<boolean>(false) const [isPrev, setIsPrev] = useState<boolean>(false)
const toggleOpenModal = () => setOpenModal((prev) => !prev) const toggleOpenModal = () => setOpenModal((prev) => !prev)
......
...@@ -10,7 +10,7 @@ const SingleImage: React.FC<SingleImageProps> = ({ ...@@ -10,7 +10,7 @@ const SingleImage: React.FC<SingleImageProps> = ({
imageURL, imageURL,
selectedImage, selectedImage,
setSelectedImageURL, setSelectedImageURL,
}: SingleImageProps) => { }) => {
const selectImage = (targetImage: string) => { const selectImage = (targetImage: string) => {
setSelectedImageURL(targetImage) setSelectedImageURL(targetImage)
} }
......
...@@ -24,7 +24,7 @@ const Poll: React.FC<PollProps> = ({ ...@@ -24,7 +24,7 @@ const Poll: React.FC<PollProps> = ({
onSave, onSave,
onCancel, onCancel,
onDelete, onDelete,
}: PollProps) => { }) => {
const handleChangeLink = (e: ChangeEvent<HTMLInputElement>) => { const handleChangeLink = (e: ChangeEvent<HTMLInputElement>) => {
handleChange(e.target.value, 'link') handleChange(e.target.value, 'link')
} }
......
import React from 'react' import React from 'react'
import { IPrice } from '../../models/price.model'
import editing from '../../assets/icons/editing.png' import editing from '../../assets/icons/editing.png'
import { IPrice } from '../../models/price.model'
interface PriceSectionProps { interface PriceSectionProps {
getDate: (date: string) => string getDate: (date: string) => string
...@@ -20,7 +20,7 @@ const PriceRow: React.FC<PriceSectionProps> = ({ ...@@ -20,7 +20,7 @@ const PriceRow: React.FC<PriceSectionProps> = ({
prices, prices,
index, index,
isNextPrice, isNextPrice,
}: PriceSectionProps) => { }) => {
const editableLimit: number = 3 const editableLimit: number = 3
return ( return (
......
...@@ -22,10 +22,7 @@ interface PriceSectionProps { ...@@ -22,10 +22,7 @@ interface PriceSectionProps {
frequency: FrequencyInMonth frequency: FrequencyInMonth
} }
const PriceSection: React.FC<PriceSectionProps> = ({ const PriceSection: React.FC<PriceSectionProps> = ({ fluid, frequency }) => {
fluid,
frequency,
}: PriceSectionProps) => {
const [prices, setPrices] = useState<IPrice[]>([]) const [prices, setPrices] = useState<IPrice[]>([])
const [nextPrice, setNextPrice] = useState<IPrice>() const [nextPrice, setNextPrice] = useState<IPrice>()
const [isLoading, setIsLoading] = useState<boolean>(false) const [isLoading, setIsLoading] = useState<boolean>(false)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment