AppFlowy-IO / AppFlowy-IO/AppFlowy-Web

[Bug] Refactor this function to not always return the same value.

Aperta
#406 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
TypeScript
Stelle
326
Fork
167
Merge medio
17h 6m
PR unite (30g)
72

Descrizione

### Bug Description

The intention of this function is not clear. Take a look.
``` JavaScript
const shouldShowForCurrentView = useCallback(() => {
if (!currentView) return true;

// Show for all views
return true;
}, [currentView]);
```

Did you mean false in the `if` statement?

### Steps to Reproduce

Take a look at the function and tell if there is any logic in it. What was the original intent?

### Expected Behavior

Should return different values or this is not needed at all.

### Browser and Version

Edge latest

### AppFlowy Version(s)

0.15

### Screenshots

_No response_

### Logs and Console Output

_No response_

### Additional Context

_No response_

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.