Optimize code

This commit is contained in:
2024-01-08 13:43:47 +08:00
parent d526d913b9
commit 88c66bd7a7
12 changed files with 68 additions and 70 deletions

View File

@@ -11,7 +11,7 @@ interface IndicatorProps {
const Indicator: React.FC<IndicatorProps> = ({ total, current, onSwitch }) => {
const handleClick = (index: number) => {
return () => {
onSwitch && onSwitch(index)
onSwitch?.(index)
}
}