Skip to content

Commit 03826f4

Browse files
Fix loading on button, add link to root page on logo (#3025)
1 parent 09fdb0c commit 03826f4

File tree

3 files changed

+11
-15
lines changed

3 files changed

+11
-15
lines changed

landing/src/components/Header.astro

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ const { isHome } = Astro.props;
88

99
<header class="flex justify-center mt-4 w-full">
1010
<div class="absolute ml-2 top-0">
11-
<Fragment class="shepherd-logo absolute ml-2" set:html={ShepherdHead} />
11+
<a href="/">
12+
<Fragment class="shepherd-logo absolute ml-2" set:html={ShepherdHead} />
13+
</a>
1214
</div>
1315

1416
<div
@@ -36,7 +38,7 @@ const { isHome } = Astro.props;
3638
type="button"
3739
>
3840
Demo
39-
</button>
41+
</button>
4042
</div>
4143

4244
<div class="flex lg:p-12">

landing/src/pages/index.astro

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,20 +15,20 @@ import MainPage from '@layouts/MainPage.astro';
1515
/>
1616
</div>
1717

18-
<div slot='content'>
19-
<div class='hero-including mt-8' id='hero-including'>
20-
<h3 class='demo-heading font-heading text-2xl uppercase'>
18+
<div slot="content">
19+
<div class="hero-including mt-8" id="hero-including">
20+
<h3 class="demo-heading font-heading text-2xl uppercase">
2121
01. How to Include
2222
</h3>
23-
<div class='hero-example-code text-left'>
23+
<div class="hero-example-code text-left">
2424
<Code
2525
code={`
2626
<link rel="stylesheet" href="shepherd.js/dist/css/shepherd.css"/>
2727
<script type="module" src="shepherd.js/dist/shepherd.mjs"></script>
2828
2929
`}
30-
lang='js'
31-
theme='nord'
30+
lang="js"
31+
theme="nord"
3232
wrap
3333
/>
3434
</div>

landing/src/pages/pricing.astro

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ import { SITE_TITLE, SITE_DESCRIPTION } from '../consts';
342342
import { actions } from 'astro:actions';
343343
import { navigate } from 'astro:transitions/client';
344344
document.addEventListener('astro:page-load', () => {
345-
const buttons = document.querySelectorAll('button');
345+
const buttons = document.querySelectorAll('[data-pricing-id]');
346346

347347
buttons.forEach((button) => {
348348
button.addEventListener('click', async (event) => {
@@ -378,17 +378,11 @@ import { SITE_TITLE, SITE_DESCRIPTION } from '../consts';
378378
console.log('Checkout result:', data, error, productPriceId);
379379

380380
if (!error) {
381-
btn.disabled = false;
382-
btn.innerHTML = originalText;
383381
navigate(data);
384382
} else {
385-
btn.disabled = false;
386-
btn.innerHTML = originalText;
387383
console.error('Checkout error:', error);
388384
}
389385
} catch (error) {
390-
btn.disabled = false;
391-
btn.innerHTML = originalText;
392386
console.error('An error occurred during checkout:', error);
393387
} finally {
394388
btn.disabled = false;

0 commit comments

Comments
 (0)