A little hard to explain, but please bear with me.
I have this function Component. The function Component code is almost the same, but how can i simplify my function MyComponent with the return value are different to each pages?
Below is my code and to better understand here is the complete sandbox code
