diff --git a/components/Dashboard/Rooms.tsx b/components/Dashboard/Rooms.tsx
index febcf4f..afa54d6 100644
--- a/components/Dashboard/Rooms.tsx
+++ b/components/Dashboard/Rooms.tsx
@@ -163,16 +163,101 @@ export default function DashboardRoom() {
// return data based on the selected filters
switch (selectedTabPane) {
case RoomTypeFilter.team:
- return teamRooms.map((room) => {
- // if the room is
+ // render sections for different types
+
+ const recurringTeam = meRooms.filter(
+ (room) =>
+ room.type == RoomType.recurring && room.status == RoomStatus.empty
+ );
+ const nowTeam = meRooms.filter(
+ (room) => room.status == RoomStatus.live
+ );
+ const scheduledTeam = meRooms.filter(
+ (room) =>
+ room.type == RoomType.scheduled && room.status == RoomStatus.empty
+ );
+
+ // sorting array of scheduled rooms
+ scheduledTeam.sort(function (a, b) {
+ // Turn your strings into dates, and then subtract them
+ // to get a value that is either negative, positive, or zero.
+ if (!b.scheduledDateTime) {
+ return -1;
+ }
+
return (
-