mirror of
https://github.com/ThatGuySam/doesitarm.git
synced 2026-05-18 06:44:46 -07:00
Fix app related videos not rendering
This commit is contained in:
parent
0cbe9b33d5
commit
f576c72451
1 changed files with 8 additions and 3 deletions
|
|
@ -86,13 +86,15 @@ export class AppTemplate {
|
|||
}
|
||||
}
|
||||
|
||||
render( data ) {
|
||||
async render( data ) {
|
||||
|
||||
const {
|
||||
app: { payload: { app, relatedVideos = [] } },
|
||||
'device-list': deviceList
|
||||
} = data
|
||||
|
||||
const hasRelatedVideos = relatedVideos.length > 0
|
||||
|
||||
// console.log('deviceList', deviceList)
|
||||
|
||||
// console.log('video.payload', Object.keys(video.payload))
|
||||
|
|
@ -110,6 +112,9 @@ export class AppTemplate {
|
|||
|
||||
const relatedLinksHtml = renderPageLinksHtml( app.relatedLinks )
|
||||
|
||||
|
||||
const relatedVideosRowHtml = hasRelatedVideos ? await this.boundComponent(VideoRow)( relatedVideos ) : null
|
||||
|
||||
return /* html */`
|
||||
<section class="container py-32">
|
||||
<div class="intro-content flex flex-col items-center text-center min-h-3/4-screen md:min-h-0 space-y-8">
|
||||
|
|
@ -151,7 +156,7 @@ export class AppTemplate {
|
|||
</div>
|
||||
</div>
|
||||
|
||||
${ relatedVideos.length > 0 ? /* html */`
|
||||
${ hasRelatedVideos ? /* html */`
|
||||
<div
|
||||
class="related-videos w-full"
|
||||
>
|
||||
|
|
@ -159,7 +164,7 @@ export class AppTemplate {
|
|||
Related Videos
|
||||
</h2>
|
||||
|
||||
${ this.boundComponent(VideoRow)( relatedVideos ) }
|
||||
${ relatedVideosRowHtml }
|
||||
|
||||
</div>
|
||||
` : '' }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue