Skip to content

Commit

Permalink
temp: fix reactivity item
Browse files Browse the repository at this point in the history
  • Loading branch information
ggazzo committed Sep 19, 2024
1 parent 54a6b8a commit fd0c2cc
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ const RoomSidepanelItem = ({ room, openedRoom, viewMode }: RoomSidepanelItemProp
const SidepanelItem = useTemplateByViewMode();
const subscription = useUserSubscription(room._id);

const itemData = useItemData({ ...subscription, ...room } as any, { viewMode, openedRoom }); // as any because of divergent and overlaping timestamp types in subs and room (type Date vs type string)
const itemData = useItemData({ ...room, ...subscription } as any, { viewMode, openedRoom }); // as any because of divergent and overlaping timestamp types in subs and room (type Date vs type string)

if (!subscription) {
return <SidepanelItem onClick={goToRoomById} is='a' {...room} {...itemData} />;
return <SidepanelItem onClick={goToRoomById} is='a' {...itemData} />;
}

return <SidepanelItem onClick={goToRoomById} {...subscription} {...itemData} />;
return <SidepanelItem onClick={goToRoomById} {...itemData} />;
};

export default memo(RoomSidepanelItem);

0 comments on commit fd0c2cc

Please sign in to comment.