sdy

add in,outcomingMsg component

...@@ -7,6 +7,8 @@ import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; ...@@ -7,6 +7,8 @@ import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
7 import { faAddressBook } from "@fortawesome/free-solid-svg-icons"; 7 import { faAddressBook } from "@fortawesome/free-solid-svg-icons";
8 import { Link } from "react-router-dom"; 8 import { Link } from "react-router-dom";
9 import Category from "../Category/CategoryContainer"; 9 import Category from "../Category/CategoryContainer";
10 +import IncomingMsg from "../../Components/IncomingMsg";
11 +import OutcomingMsg from "../../Components/OutcomingMsg";
10 12
11 const Wrapper = styled.div` 13 const Wrapper = styled.div`
12 display: grid; 14 display: grid;
...@@ -140,7 +142,14 @@ const StyledLink = styled(Link)` ...@@ -140,7 +142,14 @@ const StyledLink = styled(Link)`
140 } 142 }
141 `; 143 `;
142 144
143 -export default ({ data, location, message, onSubmit }) => { 145 +export default ({
146 + data,
147 + location,
148 + message,
149 + onSubmit,
150 + outcomingMsg,
151 + incomingMsg,
152 +}) => {
144 const { pathname } = location; 153 const { pathname } = location;
145 const roomName = pathname.slice(1, pathname.length); 154 const roomName = pathname.slice(1, pathname.length);
146 return ( 155 return (
...@@ -164,6 +173,8 @@ export default ({ data, location, message, onSubmit }) => { ...@@ -164,6 +173,8 @@ export default ({ data, location, message, onSubmit }) => {
164 <Title>Selected Menu Title</Title> 173 <Title>Selected Menu Title</Title>
165 </ChatScreenHeader> 174 </ChatScreenHeader>
166 <ChatScreenBox> 175 <ChatScreenBox>
176 + {incomingMsg && <IncomingMsg text={incomingMsg} />}
177 + {outcomingMsg && <OutcomingMsg text={outcomingMsg} />}
167 <InputWrapper> 178 <InputWrapper>
168 <InputContainer> 179 <InputContainer>
169 <form onSubmit={onSubmit}> 180 <form onSubmit={onSubmit}>
......