sdy

change useSubscription destructor

......@@ -7,9 +7,7 @@ import useInput from "../../Hooks/useInput";
export default withRouter(({ location }) => {
const [createMsg] = useMutation(NEW_MESSAGE);
const {
data: { subMessage },
} = useSubscription(SUBSCRIPTION_MSG);
const { data } = useSubscription(SUBSCRIPTION_MSG);
const message = useInput("");
......@@ -17,6 +15,9 @@ export default withRouter(({ location }) => {
e.preventDefault();
};
console.log(data);
console.log(createMsg);
return (
<ChatPresenter location={location} message={message} onSubmit={onSubmit} />
);
......