AppFlowy-IO / AppFlowy-IO/AppFlowy-Web

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

Offen
#406 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
TypeScript
Sterne
326
Forks
167
Ø Merge
17 Std. 6 Min.
Gemergte PRs (30 T.)
72

Beschreibung

### 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_

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.