Don't show floors if no articles

This commit is contained in:
kvakazyambra 2023-08-12 13:36:21 +03:00
parent f14b4a7049
commit c46e65abd2
2 changed files with 42 additions and 38 deletions

View File

@ -19,6 +19,7 @@ export const Row2 = (props: {
createComputed(() => setY(Math.floor(Math.random() * x.length)))
return (
<Show when={props.articles && props.articles.length > 0}>
<div class="floor">
<div class="wide-container">
<div class="row">
@ -43,5 +44,6 @@ export const Row2 = (props: {
</div>
</div>
</div>
</Show>
)
}

View File

@ -1,5 +1,5 @@
import type { JSX } from 'solid-js/jsx-runtime'
import { For } from 'solid-js'
import { For, Show } from 'solid-js'
import type { Shout } from '../../graphql/types.gen'
import { ArticleCard } from './ArticleCard'
@ -10,6 +10,7 @@ export const Row3 = (props: {
noAuthorLink?: boolean
}) => {
return (
<Show when={props.articles && props.articles.length > 0}>
<div class="floor">
<div class="wide-container">
<div class="row">
@ -27,5 +28,6 @@ export const Row3 = (props: {
</div>
</div>
</div>
</Show>
)
}