You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 13, 2024. It is now read-only.
I'm looking at the project code and the way you've configured Strapi to see the different options and possibilities offered by the CMS.
I notice that there's a file named 'model.ts' located in 'frontend\src\app[lang]\utils\model.ts'. However, this file is never called up, so the interfaces are never used.
Is this intentional or an oversight ?
For example, the file named 'Hero.tsx' located in 'frontend\src\app[lang]\components\Hero.tsx' has a 'Picture' interface, but it could use the one in the 'Model' file.
The text was updated successfully, but these errors were encountered:
@DimitriPSN We did not implement Strapi types in this project. Since when this was build we were still making TypeScript enhancements in Strapi.
So the Model.ts file was never used. The issue is that Strapi regenerates its when ever you add new collection types or fields. So in order to get those dynamic types we would need to do more work.
PaulBratslavsky
changed the title
Typescript - Using the 'model.ts' file
Typescript - Using the 'model.ts' file [ I added a post at the bottom on guide to implement Strapi types in the frontend.
Dec 3, 2023
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hi,
I'm looking at the project code and the way you've configured Strapi to see the different options and possibilities offered by the CMS.
I notice that there's a file named 'model.ts' located in 'frontend\src\app[lang]\utils\model.ts'. However, this file is never called up, so the interfaces are never used.
Is this intentional or an oversight ?
For example, the file named 'Hero.tsx' located in 'frontend\src\app[lang]\components\Hero.tsx' has a 'Picture' interface, but it could use the one in the 'Model' file.
The text was updated successfully, but these errors were encountered: