diff --git a/src/views/chat/MainMenu.jsx b/src/views/chat/MainMenu.jsx new file mode 100644 index 0000000..4f77168 --- /dev/null +++ b/src/views/chat/MainMenu.jsx @@ -0,0 +1,29 @@ +import React from 'react'; +import { Menu, MenuItem } from '@material-ui/core'; + +export default function MainMenu({anchorEl, open, onClose, options}) { + return ( + + {options.map((option) => ( + + {option} + + ))} + + ) +} \ No newline at end of file diff --git a/src/views/chat/RoomInfoDialog.jsx b/src/views/chat/RoomInfoMenu.jsx similarity index 100% rename from src/views/chat/RoomInfoDialog.jsx rename to src/views/chat/RoomInfoMenu.jsx diff --git a/src/views/chat/chatroom.jsx b/src/views/chat/chatroom.jsx index 3871f00..43ac11b 100644 --- a/src/views/chat/chatroom.jsx +++ b/src/views/chat/chatroom.jsx @@ -14,7 +14,8 @@ import { uosYellow } from '@utils/styles/Colors'; import UserInfoDialog from '../../components/UserInfoDialog'; import userIcon from '@img/fontawesome/chat-user.svg'; import usersIcon from '@img/fontawesome/chat-users.svg'; -import RoomInfoMenu from './RoomInfoDialog'; +import RoomInfoMenu from './RoomInfoMenu'; +import MainMenu from './MainMenu'; export default function Chatroom({id}) { const [chatRoom, setChatRoom] = useState({}); @@ -304,28 +305,7 @@ export default function Chatroom({id}) { > - - {menuOption.map((option) => ( - - {option} - - ))} - +
    { messageList.length > 0 ? messageList : {emptyMsg} }