Optimize code
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
import React from 'react'
|
||||
import _ from 'lodash'
|
||||
import '@/assets/css/components/common/indicator.scss'
|
||||
|
||||
@@ -8,7 +7,7 @@ interface IndicatorProps {
|
||||
onSwitch?: (index: number) => void
|
||||
}
|
||||
|
||||
const Indicator: React.FC<IndicatorProps> = ({ total, current, onSwitch }) => {
|
||||
const Indicator = ({ total, current, onSwitch }: IndicatorProps) => {
|
||||
const handleClick = (index: number) => {
|
||||
return () => {
|
||||
onSwitch?.(index)
|
||||
|
||||
Reference in New Issue
Block a user