diff --git a/web/components/groups/group-overview.tsx b/web/components/groups/group-overview.tsx
index 9b0f7240..6da9540a 100644
--- a/web/components/groups/group-overview.tsx
+++ b/web/components/groups/group-overview.tsx
@@ -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,93 +141,97 @@ function GroupOverviewPinned(props: {
setOpen(false)
}
- return isEditable || pinned.length > 0 ? (
- <>
-
-
- {isEditable && (
-
- )}
-
+ return isEditable || (group.pinnedItems && group.pinnedItems.length > 0) ? (
+ pinned.length > 0 || isEditable ? (
-
- {pinned.length == 0 && !editMode && (
-
-
- No pinned items yet. Click the edit button to add some!
-
-
- )}
- {pinned.map((element, index) => (
-
- {element}
-
- {editMode && (
-
{
- const newPinned = group.pinnedItems.filter((item) => {
- return item.itemId !== group.pinnedItems[index].itemId
- })
- updateGroup(group, { pinnedItems: newPinned })
- }}
- />
+
+
+ {isEditable && (
+
- ))}
- {editMode && group.pinnedItems && pinned.length < 6 && (
-
-
-
-
-
+
)}
-
+
+
+
+ {pinned.length == 0 && !editMode && (
+
+
+ No pinned items yet. Click the edit button to add some!
+
+
+ )}
+ {pinned.map((element, index) => (
+
+ {element}
+
+ {editMode && (
+ {
+ const newPinned = group.pinnedItems.filter((item) => {
+ return item.itemId !== group.pinnedItems[index].itemId
+ })
+ updateGroup(group, { pinnedItems: newPinned })
+ }}
+ />
+ )}
+
+ ))}
+ {editMode && group.pinnedItems && pinned.length < 6 && (
+
+
+
+
+
+ )}
+
+
+
+ Pin posts or markets to the overview of this group.
+
+ }
+ onSubmit={onSubmit}
+ />
-
- Pin posts or markets to the overview of this group.
-
- }
- onSubmit={onSubmit}
- />
- >
+ ) : (
+
+ )
) : (
<>>
)