Toggle navigation
Toggle navigation
This project
Loading...
Sign in
2020-1-capstone-design1
/
Triz_Project1
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
1
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
sdy
2020-05-28 16:17:22 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
3e2ec09923408314a1a27f04c048215227b437e3
3e2ec099
1 parent
d90d1f3e
update useQuery object destructuring
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
front/src/Routes/Chat/ChatContainer.js
front/src/Routes/Chat/ChatContainer.js
View file @
3e2ec09
...
...
@@ -17,14 +17,17 @@ export default withRouter(({ location }) => {
let
messageObj
,
outcomingMsg
,
roomId
;
if
(
roomName
!==
undefined
)
{
const
{
data
}
=
useQuery
(
GET_ROOM_BY_NAME
,
{
variables
:
{
roomName
}
});
const
{
data
:
{
getRoomByName
},
}
=
useQuery
(
GET_ROOM_BY_NAME
,
{
variables
:
{
roomName
}
});
roomId
=
getRoomByName
.
id
;
getRoomByName
:
{
getRoomByName
:
{
id
:
roomId
},
},
}
=
data
;
console
.
log
(
roomId
);
}
const
[
createMsg
]
=
useMutation
(
WHOLE_MESSAGE
);
const
{
data
}
=
useSubscription
(
SUBSCRIPTION_MSG
);
//
const { data } = useSubscription(SUBSCRIPTION_MSG);
const
message
=
useInput
(
""
);
...
...
Please
register
or
login
to post a comment