We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
return ( !isLoading && user.userId && <> {/* { (chatInfo?.owner === userId) && <div> <Input onChange={e => setParticipantId(e.target.value)}/> <Button onClick={handleAddParticipant}>Add participant</Button> </div> } */} { chatInfo.participants.includes(user.userId) && <> <h3>{chatInfo.tag}</h3> <ChatView nlpDialog={nlpDialog} info={{chatId: chatInfo._id, user}}/> </> } </> )
это лишнее усложнение кода. понятнее написать так:
if (!isLoading && user.userId && chatInfo.participants.includes(user.userId)) { return( <> <h3>{chatInfo.tag}</h3> <ChatView nlpDialog={nlpDialog} info={{chatId: chatInfo._id, user}}/> </> ) } return null;
и если дальше смотреть, то заголовок чата должен быть внутри компонента ChatView, а не отдельно снаружи.
The text was updated successfully, but these errors were encountered:
Но ведь будет же добавлен код, который сейчас закоменчен, например, несколько проверок будет
Sorry, something went wrong.
maisiukartyom
No branches or pull requests
это лишнее усложнение кода. понятнее написать так:
и если дальше смотреть, то заголовок чата должен быть внутри компонента ChatView, а не отдельно снаружи.
The text was updated successfully, but these errors were encountered: