getNextAdminProps function
This is the documentation for the latest version of Next Admin. If you are using an older version (<5.0.0), please refer to the documentation
The following is used only for App router.
getNextAdminProps is a function that returns the props for the NextAdmin component. It accepts one argument which is an object with the following properties:
| Name | Description |
|---|---|
| params | The array of route params retrieved from the optional catch-all segment |
| searchParams | The query params retrieved from the page |
| basePath | The base path of your admin. It is used to build the admin URL. It is mandatory. |
| apiBasePath | The base path of your admin API. It is used to build the admin API URL. It is mandatory. |
| prisma | Your Prisma client instance. |
| getMessages | A function with no parameters that returns translation messages. It is used to translate the default messages of the library. See i18n for more details. |
| locale | The locale used, find from params (e.g. en, fr). |
| options | The options object - optional. |