Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Notifications are missing isNew and read fields #20

Open
h1-the-swan opened this issue Sep 30, 2021 · 2 comments
Open

Notifications are missing isNew and read fields #20

h1-the-swan opened this issue Sep 30, 2021 · 2 comments

Comments

@h1-the-swan
Copy link

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

@markerikson
Copy link
Collaborator

Yeah, I changed the API contents when I updated it to cover RTK Query, but I forgot to remove that line from the text.

@h1-the-swan
Copy link
Author

OK. I'm having some strange unexpected behavior wrt these fields in this part of the tutorial. I thought it might be related to these missing fields, but I'm not sure it is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants