My sense of logic is getting worse
This commit is contained in:
parent
b7c5dce372
commit
33f0f21399
1 changed files with 6 additions and 6 deletions
|
@ -256,6 +256,12 @@ function Compose({
|
||||||
const canClose = () => {
|
const canClose = () => {
|
||||||
const { value, dataset } = textareaRef.current;
|
const { value, dataset } = textareaRef.current;
|
||||||
|
|
||||||
|
// check if loading
|
||||||
|
if (uiState === 'loading') {
|
||||||
|
console.log('canClose', { uiState });
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
// check for status and media attachments
|
// check for status and media attachments
|
||||||
const hasMediaAttachments = mediaAttachments.length > 0;
|
const hasMediaAttachments = mediaAttachments.length > 0;
|
||||||
if (!value && !hasMediaAttachments) {
|
if (!value && !hasMediaAttachments) {
|
||||||
|
@ -289,12 +295,6 @@ function Compose({
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// check if loading
|
|
||||||
if (uiState !== 'loading') {
|
|
||||||
console.log('canClose', { uiState });
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
console.log('canClose', {
|
console.log('canClose', {
|
||||||
value,
|
value,
|
||||||
hasMediaAttachments,
|
hasMediaAttachments,
|
||||||
|
|
Loading…
Add table
Reference in a new issue