Skip to content

[MEDIUM] HomeScreen week calculation uses undefined dueDate #228

@Muneerali199

Description

@Muneerali199

filteredAppointments references dueDate inside .map(). On initial render before fetchData(), dueDate is ''. new Date('') is Invalid Date, weekNumber becomes NaN. All appointments fail filter since NaN > 1 is false.\n\nFile: Frontend/src/Screens/HomeScreen.jsx, lines 94-96\nFix: Guard filter with if (!dueDate) return [] or use loading state

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions