From 47bd92b520072604a850a226a566e2d21dba9533 Mon Sep 17 00:00:00 2001 From: David Ball Date: Sat, 13 Jul 2024 02:23:54 -0400 Subject: [PATCH] Hoisted disclaimers to layout slot. Display Amazon disclaimer if and only if an Amazon product is showing. --- src/layouts/Layout.astro | 68 ++++++++++++++++++++++- src/pages/[productLookup].astro | 7 +-- src/pages/brand/[brandLookup].astro | 11 ++-- src/pages/category/[categoryLookup].astro | 8 +-- src/pages/index.astro | 14 ----- 5 files changed, 78 insertions(+), 30 deletions(-) diff --git a/src/layouts/Layout.astro b/src/layouts/Layout.astro index 3982b47..a397c2e 100644 --- a/src/layouts/Layout.astro +++ b/src/layouts/Layout.astro @@ -23,10 +23,22 @@ const { title } = Astro.props; - + + diff --git a/src/pages/[productLookup].astro b/src/pages/[productLookup].astro index 56bc3be..f91cbe2 100644 --- a/src/pages/[productLookup].astro +++ b/src/pages/[productLookup].astro @@ -77,11 +77,10 @@ const brand: Brand = ALL_BRANDS.find(b => b.slug === product.brandStoreSlug)!;
-
-

Dasher Supply is not endorsed by or affiliated with DoorDash. As an Amazon Associate I earn from qualifying purchases.

- About this site. -
+ {product?.amazonProductDetails && + As an Amazon Associate I earn from qualifying purchases. + }