Simplify the retun pattern for the convertComponentName function