Add spinner (#987)

This commit is contained in:
FRC 2022-10-03 15:27:15 +01:00 committed by GitHub
parent 27e6534d94
commit f5a3abf0bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -37,6 +37,7 @@ import { REFERRAL_AMOUNT } from 'common/economy'
import toast from 'react-hot-toast'
import { ENV_CONFIG } from 'common/envs/constants'
import { PostCard } from '../post-card'
import { LoadingIndicator } from '../loading-indicator'
const MAX_TRENDING_POSTS = 6
@ -140,8 +141,9 @@ function GroupOverviewPinned(props: {
setOpen(false)
}
return isEditable || pinned.length > 0 ? (
<>
return isEditable || (group.pinnedItems && group.pinnedItems.length > 0) ? (
pinned.length > 0 || isEditable ? (
<div>
<Row className="mb-3 items-center justify-between">
<SectionHeader label={'Pinned'} />
{isEditable && (
@ -226,7 +228,10 @@ function GroupOverviewPinned(props: {
}
onSubmit={onSubmit}
/>
</>
</div>
) : (
<LoadingIndicator />
)
) : (
<></>
)