0) {
- if (this.pageData.featured.heroBlocks[0].blockType === 'VideoBlock') {
- return this.pageData.featured.heroBlocks[0].video
+ if (this.pageData && this.pageData?.heroBlocks?.length > 0) {
+ if (this.pageData.heroBlocks[0].blockType === 'VideoBlock') {
+ return this.pageData.heroBlocks[0].video
}
}
return undefined
},
customImage(): object | undefined {
// parse hero streamfield block for the first usable image (newsDetailPage model)
- if (this.pageData && this.pageData.featured?.heroBlocks?.length > 0) {
- const block = this.pageData.featured.heroBlocks[0]
+ if (this.pageData?.heroBlocks?.length > 0) {
+ const block = this.pageData?.heroBlocks[0]
if (block.blockType === 'ImageChooserBlock' || block.blockType === 'HeroImageBlock') {
return block.listingPageHeroImage
} else if (block.blockType === 'CarouselBlock') {
@@ -75,8 +73,8 @@ export default defineComponent({
}
}
// else use heroImage
- else if (this.pageData?.featured?.listingPageHeroImage) {
- return this.pageData.featured.listingPageHeroImage
+ else if (this.pageData?.listingPageHeroImage) {
+ return this.pageData.listingPageHeroImage
}
return undefined
}
diff --git a/packages/vue/src/components/HeroMedium/HeroMedium.vue b/packages/vue/src/components/HeroMedium/HeroMedium.vue
index 1d58a852..f06277c6 100644
--- a/packages/vue/src/components/HeroMedium/HeroMedium.vue
+++ b/packages/vue/src/components/HeroMedium/HeroMedium.vue
@@ -74,7 +74,7 @@
{{ feature.title }}
diff --git a/packages/vue/src/components/MetadataEduResource/MetadataEduResource.vue b/packages/vue/src/components/MetadataEduResource/MetadataEduResource.vue
index 70e2e940..6f8408f5 100644
--- a/packages/vue/src/components/MetadataEduResource/MetadataEduResource.vue
+++ b/packages/vue/src/components/MetadataEduResource/MetadataEduResource.vue
@@ -11,12 +11,14 @@ interface MetadataEduResourceProps {
resource: EduResourceCardObject
compact?: boolean
variant?: string
+ showTime: boolean
}
// define props
const props = withDefaults(defineProps(), {
resource: undefined,
compact: false,
+ showTime: false,
variant: 'primary'
})
@@ -30,7 +32,11 @@ const audience = computed(() => {
return rangeifyGrades(props.resource?.gradeLevels)
})
const time = computed(() => {
- return props.resource?.time?.time
+ let time = props.resource?.time?.time
+ if (time && props.compact) {
+ time = time.replace('Under ', '<')
+ }
+ return time
})
@@ -61,7 +67,7 @@ const time = computed(() => {
{{ audience }}