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

Tutorial Posts and authProvider #8606

Closed
erikvanderwerf opened this issue Jan 30, 2023 · 3 comments · Fixed by #8607
Closed

Tutorial Posts and authProvider #8606

erikvanderwerf opened this issue Jan 30, 2023 · 3 comments · Fixed by #8607

Comments

@erikvanderwerf
Copy link
Contributor

I think I found two minor bugs with the 4.7.2 Tutorial Page.

  1. In the Handling Relationships section, the "diff" references the existing users line, not the new posts line as expected.

  2. In the Adding a Login Page section, I think that the first code line should include the type of the const authProvider. IntelliJ WebStorm (and npm start) is flagging the pasted code as not declaring any types for TypeScript.

< export const authProvider = [
> import {AuthProvider} from "react-admin";
>
> export const authProvider: AuthProvider = {

Steps to reproduce:

  1. image
  2. image

Environment
Browsing the 4.7.2 Tutorial on Chrome, using the 4.7.2 code in latest IntelliJ WebStorm EAP 231.4840.391.

  • React-admin version: 4.7.2
  • React version: 18.2.0
  • Browser: Chrome

React and TypeScript are not my strong subjects (yet!), sorry if I missed anything.

@erikvanderwerf
Copy link
Contributor Author

erikvanderwerf commented Jan 30, 2023

apologies for dumping multiple issues into the same ticket! I can split them up if desired.

I think there's a similar problem on the Connecting to A Real API section as well, TS wants to know what the dataProvider object is.

TypeScript is also being exceptionally picky about the possibility of null-header.

image

@djhi
Copy link
Collaborator

djhi commented Jan 30, 2023

Thanks for the report. Mind openning pull requests to fix those?

@erikvanderwerf
Copy link
Contributor Author

Yes I can! I did not see the Tutorial.md on my first search, otherwise I would have skipped this step 😀

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

Successfully merging a pull request may close this issue.

2 participants