import { memo } from 'react'; function ProgressBar({ count, currentTab, switchTab }) { return (
{count.map((num) => { let className = 'step'; const index = count.indexOf(num); if (index === currentTab) { className = 'step active'; } return
switchTab(index)} />; })}
); } export default memo(ProgressBar);