Display a preliminary room teaser
This commit is contained in:
parent
52d6d20194
commit
318892f55c
|
|
@ -32,9 +32,17 @@
|
||||||
return '';
|
return '';
|
||||||
},
|
},
|
||||||
teaser() {
|
teaser() {
|
||||||
// if (this.contents && this.contents.length) {
|
if (this.contents && this.contents.length) {
|
||||||
// if (this.contents[0].type === 'link')
|
let first = this.contents.find(content => content.type !== 'image_url');
|
||||||
// }
|
switch (first.type) {
|
||||||
|
case 'text_block':
|
||||||
|
return first.value.text;
|
||||||
|
case 'link_block':
|
||||||
|
return first.value.url;
|
||||||
|
default:
|
||||||
|
return ''
|
||||||
|
}
|
||||||
|
}
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue