fix: ensure Atlas Cloud sponsor logo links to website (#3170)

Prevent the sponsor logo images from intercepting clicks so the
anchor reliably opens atlascloud.ai in a new tab instead of the SVG
asset.

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
This commit is contained in:
Amruth Pillai
2026-06-20 06:03:46 +02:00
committed by GitHub
parent ae2a1dac12
commit 56c90947e4
2 changed files with 21 additions and 9 deletions
@@ -33,12 +33,19 @@ describe("Sponsors", () => {
expect(link).toHaveAttribute("rel", "noopener noreferrer");
});
it("renders the full Atlas Cloud logo", () => {
const { getByAltText } = renderSponsors(true);
it("renders the full Atlas Cloud logo inside the sponsor link", () => {
const { container, getByRole } = renderSponsors(true);
const logo = getByAltText("Atlas Cloud");
expect(logo).toHaveAttribute("src", "/sponsors/atlas-cloud-logo-black.svg");
expect(logo).toHaveClass("h-20");
const link = getByRole("link", { name: "Atlas Cloud" });
const logos = container.querySelectorAll("a[aria-label='Atlas Cloud'] img");
expect(logos).toHaveLength(2);
expect(logos[0]).toHaveAttribute("src", "/sponsors/atlas-cloud-logo-black.svg");
expect(logos[0]).toHaveClass("h-20", "pointer-events-none");
expect(logos[0]).toHaveAttribute("draggable", "false");
expect(logos[1]).toHaveAttribute("src", "/sponsors/atlas-cloud-logo-white.svg");
expect(link).toContainElement(logos[0] as HTMLElement);
expect(link).toContainElement(logos[1] as HTMLElement);
});
it("thanks sponsors and links sponsorship inquiries to email", () => {
@@ -28,18 +28,23 @@ export const Sponsors = ({ show }: SponsorsProps) => {
target="_blank"
rel="noopener noreferrer"
aria-label="Atlas Cloud"
className="mt-12 block"
className="mt-12 inline-block"
>
<span className="sr-only">Atlas Cloud</span>
<img
src="/sponsors/atlas-cloud-logo-black.svg"
alt="Atlas Cloud"
className="h-20 w-auto md:h-24 dark:hidden"
alt=""
aria-hidden="true"
draggable={false}
className="pointer-events-none h-20 w-auto md:h-24 dark:hidden"
loading="lazy"
/>
<img
src="/sponsors/atlas-cloud-logo-white.svg"
alt=""
className="hidden h-20 w-auto md:h-24 dark:block"
aria-hidden="true"
draggable={false}
className="pointer-events-none hidden h-20 w-auto md:h-24 dark:block"
loading="lazy"
/>
</a>