Skip to content

Fix Loading State in Newsfeed #2099

@Mephistic

Description

@Mephistic

Summary

The Newsfeed currently has no loading state - between page load and the actual fetch of the notification data, we will display the "No Results" page state (that should only appear when the user has no notifications). It's actually even stranger - we do display a loading spinner temporarily, but will somehow still load the Newsfeed before the notification data is ready, causing this error. We may need to adjust the

This is misleading - we should modify this page so that we display a loading state until we have the real notifications data.

Success Criteria

  • Add a "Loading" state to the Newsfeed page that displays until the Notifications data fetch call has finished
    • No Figma here, but the current "Loading" state for the page would be acceptable (so long as we update the logic so it displays at the correct time).
  • The "No Results" screen should never show at any point in the page load process if the user truly does have any notifications

Additional Links

Newsfeed component: https://github.com/codeforboston/maple/blob/main/components/Newsfeed/Newsfeed.tsx#L21

Metadata

Metadata

Assignees

No one assigned

    Labels

    Ready for DevelopmentAutomatically assigned to issues that are ready to be picked upfrontendFrontend developmentgood first issueGood for newcomers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions