mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-03-14 12:18:30 +03:00
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 { value, dataset } = textareaRef.current;
|
||||
|
||||
// check if loading
|
||||
if (uiState === 'loading') {
|
||||
console.log('canClose', { uiState });
|
||||
return false;
|
||||
}
|
||||
|
||||
// check for status and media attachments
|
||||
const hasMediaAttachments = mediaAttachments.length > 0;
|
||||
if (!value && !hasMediaAttachments) {
|
||||
|
@ -289,12 +295,6 @@ function Compose({
|
|||
return true;
|
||||
}
|
||||
|
||||
// check if loading
|
||||
if (uiState !== 'loading') {
|
||||
console.log('canClose', { uiState });
|
||||
return true;
|
||||
}
|
||||
|
||||
console.log('canClose', {
|
||||
value,
|
||||
hasMediaAttachments,
|
||||
|
|
Loading…
Add table
Reference in a new issue