products – Magento2.3: the Compare slider does not work


We have customized the comparison products according to our requirements. However, it does not work as expected. I am not sure if the data link works or not. When I add two products to add to compare, I get the following

enter the description of the image here

For your information, I am using slick slider for this.

Below is my code:

Script:

require((
        'jquery',
        'slick'
    ), function ($) {
        jQuery(document).ready(function () {

              jQuery(".regular").not('.slick-initialized').slick({
                dots: true,
                infinite: true,
                speed: 300,
                slidesToShow: 4,
                slidesToScroll: 4,
                responsive: (
                    {
                        breakpoint: 1280,
                        settings: {
                            slidesToShow: 3,
                            slidesToScroll: 3
                        }
                    },
                    {
                        breakpoint: 768,
                        settings: {
                            slidesToShow: 2,
                            slidesToScroll: 2
                        }
                    },
                    {
                        breakpoint: 600,
                        settings: {
                            slidesToShow: 1,
                            slidesToScroll: 1
                        }
                    }
                )
            });
        });
    });

Model:

$3,499.99

()

I want the output as follows:

enter the description of the image here

Could someone help me with this?