Skip to content

Commit

Permalink
fix: hero button link (#792)
Browse files Browse the repository at this point in the history
* fix: add link to hero content button

* chore: update demo data with links

* docs: update changelog
  • Loading branch information
ksted authored Nov 12, 2024
1 parent c2243b0 commit e92d58b
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
10 changes: 8 additions & 2 deletions apps/web/components/ui/HeroContent/HeroContent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@
{{ heroItemProps.description }}
</p>
<div class="flex flex-col md:flex-row gap-4 mt-6">
<UiButton size="lg">{{ heroItemProps.callToAction }}</UiButton>
<UiButton :tag="NuxtLink" :to="localePath(props.heroItemProps.link ?? '')" size="lg">{{
heroItemProps.callToAction
}}</UiButton>
</div>
</div>
</div>
Expand All @@ -39,8 +41,12 @@
<script setup lang="ts">
import { HeroContentProps, SizeKey } from '../HeroCarousel/types';
defineProps<{
const props = defineProps<{
heroItemProps: HeroContentProps;
currentSizeKey: SizeKey;
}>();
const localePath = useLocalePath();
const NuxtLink = resolveComponent('NuxtLink');
</script>
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"description": "Immerse yourself in rich, crystal-clear audio with our cutting-edge headphones. Designed for the ultimate listening experience, whether you're a casual listener or an audiophile. Discover the perfect blend of style, comfort, and sound quality that elevates your music to new heights.\n\n",
"descriptionColor": "#000000",
"callToAction": "Order Now",
"link": ""
"link": "/gear"
},
{
"image": {
Expand All @@ -33,7 +33,7 @@
"description": "Unleash your audio with our state-of-the-art wireless earbuds. Designed for all-day comfort and uncompromised sound quality, these earbuds deliver crisp highs and deep bass, letting you enjoy your music without any distractions. Discover freedom with a perfect fit, long battery life, and intuitive controls.",
"descriptionColor": "#000000",
"callToAction": "Shop Earbuds",
"link": ""
"link": "/gear"
},
{
"image": {
Expand All @@ -50,7 +50,7 @@
"description": "Transform your space with our portable speakers that pack a punch. Crafted for superior sound performance, these speakers are perfect for home or on the go. With easy connectivity and a sleek design, elevate your listening experience whether you're indoors or outdoors.",
"descriptionColor": "#000000",
"callToAction": "Browse Speakers",
"link": ""
"link": "/gear"
}
],
"valueProposition": [
Expand Down
1 change: 1 addition & 0 deletions docs/changelog/changelog_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
- Load more accurate images sizes for product page.
- Reload page after login so the customer class affects prices and categories
- Empty cart notification was displayed when user navigates to cart. Now only shown when the cart is emptied in checkout.
- The hero button now links to the provided destination.

## v1.7.0 (2024-11-06) <a href="https://github.com/plentymarkets/plentyshop-pwa/compare/v1.6.0...v1.7.0" target="_blank" rel="noopener"><b>Overview of all changes</b></a>

Expand Down

0 comments on commit e92d58b

Please sign in to comment.