"use client";

import { usePathname } from "next/navigation";

export function HideOnDashboards({ children }: { children: React.ReactNode }) {
  const pathname = usePathname();
  
  if (pathname?.startsWith("/admin") || pathname?.startsWith("/dashboard") || pathname?.startsWith("/my-account")) {
    return null;
  }
  
  return <>{children}</>;
}
