From e21219aba62e75cc12ed8a4bffb99fda3adf8df1 Mon Sep 17 00:00:00 2001 From: Nathan Cummins Date: Fri, 16 Oct 2026 13:08:26 +1030 Subject: [PATCH] Tidy icon noise, URL strings, and null guards --- src/components/ContactForm.astro | 1 + src/components/Footer.astro | 3 ++- src/components/SEO.astro | 5 +++-- src/components/TextLink.astro | 2 +- src/pages/contact.astro | 8 ++++++-- 5 files changed, 13 insertions(+), 6 deletions(-) diff --git a/src/components/ContactForm.astro b/src/components/ContactForm.astro index 869b126..1ec30d7 100644 --- a/src/components/ContactForm.astro +++ b/src/components/ContactForm.astro @@ -86,6 +86,7 @@ const { id: ID = "contact-form" } = Astro.props; const loadingIcon = form.querySelector( `#${CSS.escape(ID + "-loading-icon")}` ); + if (!responseMsg || !button || !loadingIcon) return; form.addEventListener("submit", async function (event) { event.preventDefault(); diff --git a/src/components/Footer.astro b/src/components/Footer.astro index 0286d2d..33aa615 100644 --- a/src/components/Footer.astro +++ b/src/components/Footer.astro @@ -62,5 +62,6 @@ import TextLink from "@components/TextLink.astro"; diff --git a/src/components/SEO.astro b/src/components/SEO.astro index 98abdbb..aadedd7 100644 --- a/src/components/SEO.astro +++ b/src/components/SEO.astro @@ -7,6 +7,7 @@ interface Props { } const { title, description, url = Astro.url, image } = Astro.props; +const canonicalUrl = url.toString(); import person from "@data/person"; import site from "@data/site"; @@ -15,7 +16,7 @@ import { Schema } from "astro-seo-schema"; --- - + - + { includeExternalLinkIcon && linkIsExternal && ( - +