How to make a repeater "display-none", when database is empty?

I want to hide a section and a button, when the Repeater Filter shows no items. How is it possible?
https://www.pompoeoes.com/subcategory/gem%C3%A4lde

Give it a try:

$w('#dataset_id').onReady(() => {
 if ($w('#repeater_id').data.length > 0) {
        $w('#sections_id').expand();
    } else {
        $w('#sections_id').collapse();
    }
});

$w( " #dataset1 ).onReady(() => {

if ($w( " #Productsnewrepeater " ).data.length > 0 ) {

$w( " #subcategoryproducts " ).expand(); } else {
$w( " #Subcategoryproducts " ).collapse();
}
});

hmm does not work do you see a mistake?

@chrisdis9112383 Is this a dynamic page?
Where does the reporter get the information from?
Can you share a screenshot of the editor and code on the page?