To avoid passing the prisma and options twice, to the getNextAdminProps and createHandler functions. Create a function that retrieves these two parameters and returns a pre-initialized version of getNextAdminProps and createHandler. This will prevent people from forgetting to put options in both functions and leading to strange problems.
Summary
To avoid passing the
prisma
andoptions
twice, to thegetNextAdminProps
andcreateHandler
functions. Create a function that retrieves these two parameters and returns a pre-initialized version ofgetNextAdminProps
andcreateHandler
. This will prevent people from forgetting to putoptions
in both functions and leading to strange problems.Basic Example
Drawbacks
No response
Unresolved questions
No response