print something when there is nothing

This commit is contained in:
b1ek 2024-11-11 21:18:56 +10:00
parent c23994091b
commit 0b9547a494
Signed by: blek
GPG Key ID: A622C22C9BC616B2
2 changed files with 6 additions and 1 deletions

View File

@ -28,6 +28,11 @@ export function Posts(props: PostsProps) {
</li>
)
}
{
props.rows.length == 0
? <pre>empty!</pre>
: null
}
</ul>
);
}

View File

@ -94,7 +94,7 @@ export function Index() {
{
data
? <Posts rows={data.filter(x => selected ? selected?.indexOf(x) === -1 : true)} onSelectChange={select} />
: <></>
: <pre>no data!</pre>
}
</InfiniteScroller>
</div>