From 016b11fbd88f13924579b177f2d6bff1601191df Mon Sep 17 00:00:00 2001 From: Robbie Wagner Date: Wed, 16 Oct 2024 13:32:17 -0400 Subject: [PATCH] Fix loading on button, add link to root page on logo --- landing/src/components/Header.astro | 6 ++++-- landing/src/pages/index.astro | 12 ++++++------ landing/src/pages/pricing.astro | 8 +------- 3 files changed, 11 insertions(+), 15 deletions(-) diff --git a/landing/src/components/Header.astro b/landing/src/components/Header.astro index a300508ca..b2cdc7de4 100644 --- a/landing/src/components/Header.astro +++ b/landing/src/components/Header.astro @@ -8,7 +8,9 @@ const { isHome } = Astro.props;
-
Demo - +
diff --git a/landing/src/pages/index.astro b/landing/src/pages/index.astro index c6ecb3a4a..9af6eefa7 100644 --- a/landing/src/pages/index.astro +++ b/landing/src/pages/index.astro @@ -15,20 +15,20 @@ import MainPage from '@layouts/MainPage.astro'; />
-
-
-

+
+
+

01. How to Include

-
+
`} - lang='js' - theme='nord' + lang="js" + theme="nord" wrap />
diff --git a/landing/src/pages/pricing.astro b/landing/src/pages/pricing.astro index 46634536a..343bdae48 100644 --- a/landing/src/pages/pricing.astro +++ b/landing/src/pages/pricing.astro @@ -342,7 +342,7 @@ import { SITE_TITLE, SITE_DESCRIPTION } from '../consts'; import { actions } from 'astro:actions'; import { navigate } from 'astro:transitions/client'; document.addEventListener('astro:page-load', () => { - const buttons = document.querySelectorAll('button'); + const buttons = document.querySelectorAll('[data-pricing-id]'); buttons.forEach((button) => { button.addEventListener('click', async (event) => { @@ -378,17 +378,11 @@ import { SITE_TITLE, SITE_DESCRIPTION } from '../consts'; console.log('Checkout result:', data, error, productPriceId); if (!error) { - btn.disabled = false; - btn.innerHTML = originalText; navigate(data); } else { - btn.disabled = false; - btn.innerHTML = originalText; console.error('Checkout error:', error); } } catch (error) { - btn.disabled = false; - btn.innerHTML = originalText; console.error('An error occurred during checkout:', error); } finally { btn.disabled = false;