Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reply message functionality #9

Merged
merged 8 commits into from
Jun 6, 2022
Merged

Reply message functionality #9

merged 8 commits into from
Jun 6, 2022

Conversation

theonej203
Copy link
Contributor

No description provided.

Copy link
Member

@aerovulpe aerovulpe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs a few changes before merge.

)
}
/>
<div key={message.id} id={message.id + ''}>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why the empty string concatenation?

const { sendFileMessage } = useContext(ChatAppContext);
const [file, setFile] = useState<File>();
const { sendFileMessage, setFile } = useContext(ChatAppContext);
const [file, setCurrentFile] = useState<File | null>();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please follow the const [x, setX] = useState naming convention

const { sendFileMessage } = useContext(ChatAppContext);
const [file, setFile] = useState<File>();
const { sendFileMessage, setFile } = useContext(ChatAppContext);
const [file, setCurrentFile] = useState<File | null>();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, initialize the state value to null

const test: any = message ;

if(test.nestedLevel > 0){
console.log(test.nestedLevel)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove this console log statement

@aerovulpe aerovulpe merged commit 44fd03c into ChatKitty:main Jun 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants