I am using
Magento2.3.1 and I need to list and detail page current product if add compare product than getting list and count on list and detail page. So I try to detail and list page checkbox with compare link click than product add and remove on one link.
If anyone this type of functionality working code share with and appreciated for help.
i share with u screen this type showing