0

Remove div container when action buttons is empty (#1124)

Co-authored-by: Timur Zhigmytov <timur.zhigmytov@mediamonks.com>
This commit is contained in:
Timur Zhigmytov 2021-06-20 07:12:28 +06:00 committed by GitHub
parent 2bc9b4b7e7
commit 1b5f8b9f1d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -550,21 +550,22 @@ export default class App extends Component {
: html` <${VideoPoster} offlineImage=${logo} active=${streamOnline} /> `;
const externalActionButtons =
externalActions &&
html`<div
id="external-actions-container"
class="flex flex-row align-center"
>
${externalActions.map(
function (action, index) {
return html`<${ExternalActionButton}
onClick=${this.displayExternalAction}
action=${action}
index=${index}
/>`;
}.bind(this)
)}
</div>`;
externalActions && externalActions.length > 0
? html`<div
id="external-actions-container"
class="flex flex-row align-center"
>
${externalActions.map(
function (action, index) {
return html`<${ExternalActionButton}
onClick=${this.displayExternalAction}
action=${action}
index=${index}
/>`;
}.bind(this)
)}
</div>`
: null;
const externalActionModal = externalAction
? html`<${ExternalActionModal}
@ -667,7 +668,7 @@ export default class App extends Component {
<h2 class="font-semibold text-5xl">
<span class="streamer-name text-indigo-600">${name}</span>
</h2>
<div>${externalActionButtons}</div>
${externalActionButtons && html`<div>${externalActionButtons}</div>`}
<h3 class="font-semibold text-3xl">
${streamOnline && streamTitle}
</h3>