organify-ui 0.2.15 → 0.2.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3935,18 +3935,22 @@ function useMediaQuery2(query) {
3935
3935
  }
3936
3936
  function OrganifyChat({
3937
3937
  workspaceRole,
3938
- workspaceMembers = [],
3938
+ workspaceMembers,
3939
3939
  initialRooms,
3940
3940
  initialMessages,
3941
3941
  className
3942
3942
  }) {
3943
3943
  const user = useOrganifyUser();
3944
3944
  const userId = user?.id ?? "";
3945
+ const stableWorkspaceMembers = React7.useMemo(
3946
+ () => workspaceMembers ?? [],
3947
+ [workspaceMembers]
3948
+ );
3945
3949
  const chat = useChat({
3946
3950
  workspaceRole,
3947
3951
  initialRooms,
3948
3952
  initialMessages,
3949
- workspaceMembers
3953
+ workspaceMembers: stableWorkspaceMembers
3950
3954
  });
3951
3955
  const isMobile = !useMediaQuery2("(min-width: 768px)");
3952
3956
  const [createDialogOpen, setCreateDialogOpen] = React7.useState(false);
@@ -4025,7 +4029,7 @@ function OrganifyChat({
4025
4029
  onStopTyping: chat.sendTyping,
4026
4030
  onOpenManagement: () => setManagementOpen(true),
4027
4031
  isMobile: false,
4028
- mentionUsers: workspaceMembers,
4032
+ mentionUsers: stableWorkspaceMembers,
4029
4033
  mentionProjects: MOCK_PROJECTS,
4030
4034
  hasMore: chat.hasMoreMessages,
4031
4035
  onLoadMore: chat.loadMoreMessages,
@@ -4077,7 +4081,7 @@ function OrganifyChat({
4077
4081
  onOpenManagement: handleOpenManagement,
4078
4082
  onBack: handleBackToSidebar,
4079
4083
  isMobile: true,
4080
- mentionUsers: workspaceMembers,
4084
+ mentionUsers: stableWorkspaceMembers,
4081
4085
  mentionProjects: MOCK_PROJECTS,
4082
4086
  hasMore: chat.hasMoreMessages,
4083
4087
  onLoadMore: chat.loadMoreMessages,
@@ -4130,7 +4134,7 @@ function OrganifyChat({
4130
4134
  if (room) chat.selectRoom(room.id);
4131
4135
  return room;
4132
4136
  },
4133
- workspaceMembers
4137
+ workspaceMembers: stableWorkspaceMembers
4134
4138
  }
4135
4139
  )
4136
4140
  ]
@@ -4139,5 +4143,5 @@ function OrganifyChat({
4139
4143
  }
4140
4144
 
4141
4145
  export { Alert, Button, ChatMessages, ChatSidebar, CreateRoomDialog, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, Input, Label, MOCK_PROJECTS, MOCK_USERS, MentionPopover, MessageBubble, MessageInput, OrgLoader, OrgLoaderInline, OrganifyChat, ResponsiveDialog, RoomManagementPanel, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, TypingIndicatorMock, alertVariants, buttonVariants, generateAutoReplies, getMockMentionOptions, getRoomPermissions, inputVariants, orgLoaderVariants, typingIndicator, useChat };
4142
- //# sourceMappingURL=chunk-LQSR6MGW.js.map
4143
- //# sourceMappingURL=chunk-LQSR6MGW.js.map
4146
+ //# sourceMappingURL=chunk-INKNHHKT.js.map
4147
+ //# sourceMappingURL=chunk-INKNHHKT.js.map