diff --git a/frontend-next/src/components/app/datatypes.js b/frontend-next/src/components/app/datatypes.js index 343c23d..702126a 100644 --- a/frontend-next/src/components/app/datatypes.js +++ b/frontend-next/src/components/app/datatypes.js @@ -1,6 +1,9 @@ import Link from "next/link" import { useEffect, useState } from "react"; +// Icons +import PersonIcon from '@mui/icons-material/Person'; + // Colors for Messages const userColors = [ "#ff80ed", @@ -160,12 +163,33 @@ export function Member({ memberObj }) { * @returns {Object} - Chat Room Component */ export function ChatRoomSidebar({ roomObj }) { + if ("users" in roomObj) { + if ("online" in roomObj.users) { + var roomOnline = Object.keys(roomObj.users.online).length + } else { + var roomOnline = 0 + } + if ("all" in roomObj.users) { + var roomTotal = Object.keys(roomObj.users.all).length + } else { + var roomTotal = 0 + } + } else { + var roomOnline = 0 + var roomTotal = 0 + } return (