Add spinner (#987)
This commit is contained in:
parent
27e6534d94
commit
f5a3abf0bc
|
@ -37,6 +37,7 @@ import { REFERRAL_AMOUNT } from 'common/economy'
|
||||||
import toast from 'react-hot-toast'
|
import toast from 'react-hot-toast'
|
||||||
import { ENV_CONFIG } from 'common/envs/constants'
|
import { ENV_CONFIG } from 'common/envs/constants'
|
||||||
import { PostCard } from '../post-card'
|
import { PostCard } from '../post-card'
|
||||||
|
import { LoadingIndicator } from '../loading-indicator'
|
||||||
|
|
||||||
const MAX_TRENDING_POSTS = 6
|
const MAX_TRENDING_POSTS = 6
|
||||||
|
|
||||||
|
@ -140,8 +141,9 @@ function GroupOverviewPinned(props: {
|
||||||
setOpen(false)
|
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">
|
<Row className="mb-3 items-center justify-between">
|
||||||
<SectionHeader label={'Pinned'} />
|
<SectionHeader label={'Pinned'} />
|
||||||
{isEditable && (
|
{isEditable && (
|
||||||
|
@ -226,7 +228,10 @@ function GroupOverviewPinned(props: {
|
||||||
}
|
}
|
||||||
onSubmit={onSubmit}
|
onSubmit={onSubmit}
|
||||||
/>
|
/>
|
||||||
</>
|
</div>
|
||||||
|
) : (
|
||||||
|
<LoadingIndicator />
|
||||||
|
)
|
||||||
) : (
|
) : (
|
||||||
<></>
|
<></>
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user