From caca00ce30256dfbc6c38e9a8696163f3b9d50e7 Mon Sep 17 00:00:00 2001 From: dekzter Date: Wed, 12 Mar 2025 16:50:08 -0400 Subject: [PATCH] fixed store when adding channels in bulk --- frontend/src/store/channels.jsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/frontend/src/store/channels.jsx b/frontend/src/store/channels.jsx index dde00729..347838bd 100644 --- a/frontend/src/store/channels.jsx +++ b/frontend/src/store/channels.jsx @@ -48,7 +48,10 @@ const useChannelsStore = create((set) => ({ set((state) => ({ channels: { ...state.channels, - ...newChannels, + ...newChannels.reduce((acc, channel) => { + acc[channel.id] = channel; + return acc; + }, {}), }, })),