diff --git a/components/Stepper2/Stepper2.tsx b/components/Stepper2/Stepper2.tsx index fe387eb..7a83cfd 100644 --- a/components/Stepper2/Stepper2.tsx +++ b/components/Stepper2/Stepper2.tsx @@ -1,35 +1,33 @@ import React, { useState, useEffect } from 'react'; import styles from './Stepper2.module.scss'; - interface StepperProps { - disabled ?: boolean - disabledLeft ?: boolean - disabledRight ?: boolean - initCount : number - callbackCount?: (count: number) => void; + disabled?: boolean; + disabledLeft?: boolean; + disabledRight?: boolean; + initCount: number; + callbackCount?: (count: number) => void; } -export default function Stepper2 ( { disabled, disabledLeft, disabledRight, initCount, callbackCount }: StepperProps ) { - const [count, setCount] = useState(initCount || 0); +export default function Stepper2({ disabled, disabledLeft, disabledRight, initCount, callbackCount }: StepperProps) { + const [count, setCount] = useState(initCount || 0); - useEffect(() => { - setCount(initCount); - }, [initCount]) + useEffect(() => { + setCount(initCount); + }, [initCount]); - const sendCount = (count: number) => { - callbackCount?.(count); - } + const sendCount = (count: number) => { + callbackCount?.(count); + }; return (
- + >- {count}