const ProgressBarVertical: React.FC<ProgressProps> = ({ Levelorder, currentLevel, }) => { if (Levelorder === 0) { switch (currentLevel) { case 0: return <View style={styles.progressIncompleteFirst} /> default: return <View style={styles.progressCompleteFirst} /> } } else if (Levelorder > currentLevel) { return <View style={styles.progressIncomplete} /> } else if (Levelorder < currentLevel) { return <View style={styles.progressComplete} /> } else { return <View style={styles.progressIncomplete} /> }
I'm was in a rush and I did my conditions like this, But I feel I still can improve this. Can someone show me how?