Skip to content

Notifications are missing isNew and read fields #20

@h1-the-swan

Description

@h1-the-swan

The tutorial says: "Our fake API is already sending back the notification entries with isNew and read fields, so we can use those in our code."

But the notifications sent from the server don't seem to have those fields:

const notifications = [...Array(numNotifications)].map(() => {
const user = randomFromArray(db.user.getAll())
const template = randomFromArray(notificationTemplates)
return {
id: nanoid(),
date: faker.date.between(pastDate, now).toISOString(),
message: template,
user: user.id,
}
})
return notifications

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