Skip to content
Snippets Groups Projects
Commit 554cd758 authored by Christos's avatar Christos
Browse files

Merge branch 'fix-commment-title' into 'master'

fix(services): comment fix username

See merge request !530
parents 3b60fc7e ba754886
No related branches found
No related tags found
1 merge request!530fix(services): comment fix username
Pipeline #56806 canceled with stages
...@@ -257,6 +257,12 @@ const EditoriaLayout = ({ editor }) => { ...@@ -257,6 +257,12 @@ const EditoriaLayout = ({ editor }) => {
useEffect(() => {}, [delayedShowedNotes]); useEffect(() => {}, [delayedShowedNotes]);
// const users = [{
// userId: '1',
// displayName: 'test test',
// currentUser: true,
// }]
return ( return (
<ThemeProvider theme={cokoTheme}> <ThemeProvider theme={cokoTheme}>
<Wrapper style={fullScreenStyles} id="wax-container"> <Wrapper style={fullScreenStyles} id="wax-container">
......
...@@ -132,9 +132,14 @@ export default ({ comment, top, commentId, recalculateTops, users }) => { ...@@ -132,9 +132,14 @@ export default ({ comment, top, commentId, recalculateTops, users }) => {
const onClickPost = ({ commentValue, title }) => { const onClickPost = ({ commentValue, title }) => {
setClickPost(true); setClickPost(true);
const currentUser = user || (users || []).find(u => u.currentUser === true);
const obj = { const obj = {
content: commentValue, content: commentValue,
displayName: user.username, displayName: currentUser
? currentUser.displayName || currentUser.username
: 'Anonymous',
userId: currentUser ? currentUser.userId : '1',
timestamp: Math.floor(Date.now()), timestamp: Math.floor(Date.now()),
}; };
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment