Skip to content

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

Description

@telebovich

Bug Description

The intention of this function is not clear. Take a look.

  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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions