diff --git a/app/(prowler)/page.tsx b/app/(prowler)/page.tsx
index b352170bd1..1fdd78d351 100644
--- a/app/(prowler)/page.tsx
+++ b/app/(prowler)/page.tsx
@@ -11,7 +11,7 @@ export default function Home() {
<>
-
+
= ({
}) => {
const router = useRouter();
const searchParams = useSearchParams();
+ const [showClearButton, setShowClearButton] = useState(false);
+
+ useEffect(() => {
+ const hasFilters = Array.from(searchParams.keys()).some(
+ (key) => key.startsWith("filter[") || key === "sort",
+ );
+ setShowClearButton(hasFilters);
+ }, [searchParams]);
const clearAllFilters = useCallback(() => {
const params = new URLSearchParams(searchParams.toString());
@@ -49,15 +57,18 @@ export const FilterControls: React.FC = ({
{regions && }
{accounts && }
{mutedFindings && }
-
+
+ {showClearButton && (
+
+ )}
);
};