EventCarousel: Do not show placeholder if already has results

Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
marcin mikołajczak 2022-11-28 00:46:32 +01:00
parent 5d1921b2cc
commit 6fb8290444
1 changed files with 4 additions and 4 deletions

View File

@ -40,11 +40,11 @@ const EventCarousel: React.FC<IEventCarousel> = ({ statusIds, isLoading, emptyMe
setIndex(index % statusIds.size); setIndex(index % statusIds.size);
}; };
if (isLoading) {
return <PlaceholderEventPreview />;
}
if (statusIds.size === 0) { if (statusIds.size === 0) {
if (isLoading) {
return <PlaceholderEventPreview />;
}
return ( return (
<Card variant='rounded' size='lg'> <Card variant='rounded' size='lg'>
{emptyMessage} {emptyMessage}