When we're done with the Edit page, we should sort out database operations and such into a file (or more) in the API route. This is so that performing DB connections aren't repetitive and will cause more code to the actual page.
On top of that...
The page components also need to be cleaned up as well. I have noticed a decrease in speed on our pages, probably because of the different codes found in there like the stylings as such, or if we can, export some functions and components, and pass down child props onto them so that we don't have to use **GetStaticProps** on each one.
Database Cleanup
When we're done with the Edit page, we should sort out database operations and such into a file (or more) in the API route. This is so that performing DB connections aren't repetitive and will cause more code to the actual page.
On top of that...
The page components also need to be cleaned up as well. I have noticed a decrease in speed on our pages, probably because of the different codes found in there like the stylings as such, or if we can, export some functions and components, and pass down child props onto them so that we don't have to use **GetStaticProps** on each one.
Happy New Year!