How to get current content-type name from listView


I am currently working on a plugin that uses the builtin “listView” predefined injection zone to add a button to my admin UI. However, I want this button to only be displayed for a specific content-type. I have achieved something similar on the “editView” by tapping into useCMEditViewDataManager(), but that does not seem to have the info I need on the listView.

I have found this related link that suggests URL parsing, which feels plain evil: How to acces data in listView like in editView with useCMEditViewDataManager?

Is there a more elegant solution I can use? Thanks