Are you hoping to create button components with those blocks ?
You are creating a list of button names (not button components), then attempting to see if a component is in that list. This will not work.
You need an extension such as CompCreator to create dynamic components