From 442b5c5bf4546abfff4c08b4aaa34f6f36b99a0c Mon Sep 17 00:00:00 2001 From: Arjun Patel Date: Sat, 22 Jan 2022 01:17:15 -0800 Subject: [PATCH] fixing archived rooms ui --- components/Dashboard/Rooms.tsx | 24 ++++++---- components/RoomCard.tsx | 83 ++++++++++++++++++++++++++++++++++ components/RoomTypeTag.tsx | 33 ++++++++++++-- 3 files changed, 125 insertions(+), 15 deletions(-) diff --git a/components/Dashboard/Rooms.tsx b/components/Dashboard/Rooms.tsx index ab1e81d..56d5a39 100644 --- a/components/Dashboard/Rooms.tsx +++ b/components/Dashboard/Rooms.tsx @@ -294,16 +294,20 @@ export default function DashboardRoom() { ); case RoomTypeFilter.archived: - return archivedRooms.map((room) => { - // if the room is - return ( - - ); - }); + return ( + + {archivedRooms.map((room) => { + // if the room is + return ( + + ); + })} + + ); default: return allRooms.map((room) => { // if the room is diff --git a/components/RoomCard.tsx b/components/RoomCard.tsx index 20de23a..cb2362e 100644 --- a/components/RoomCard.tsx +++ b/components/RoomCard.tsx @@ -263,6 +263,89 @@ export default function RoomCard(props: IRoomCardProps) { } } + if (props.room.status == RoomStatus.archived) { + return ( + <> + + {membersInvited()} + + {/* header */} + + {/* meeting details */} + + + {props.room.name} + + + + {props.room.description} + + + + {/* all invited members who are not in the room already */} + + + + + + {/* room status and link(s) */} + + {renderTopRightCardInfo()} + + + {props.room.approximateDateTime} + + + + {/* room attachments */} + + {props.room.attachments && props.room.attachments.length > 0 ? ( + + ) : ( + <> + )} + + + {/* footer */} + + + + + + ); + } + return ( ); } else if (props.roomStatus == RoomStatus.archived) { - return ( - - archived - - ); + if (props.roomType == RoomType.now) { + return ( + // + // archived + // + + + + now room + + ); + } else if (props.roomType == RoomType.scheduled) { + return ( + + + scheduled room + + ); + } else if (props.roomType == RoomType.recurring) { + return ( + + + recurring room + + ); + } } // if it's just empty and not empty, then go ahead and show the right type