File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -333,9 +333,17 @@ export class NextDrupalPages extends NextDrupal {
333333 /**
334334 * Translates a path from the context.
335335 *
336- * @param {GetStaticPropsContext } context The static props context .
336+ * @param {GetStaticPropsContext } context The context from `getStaticProps` or `getServerSideProps` .
337337 * @param {Object } options Options for the request.
338338 * @returns {Promise<DrupalTranslatedPath | null> } The translated path.
339+ * @requires Decoupled Router module
340+ * @example
341+ * Get info about a path from `getStaticProps` context
342+ * ```ts
343+ * export async function getStaticProps(context) {
344+ * const path = await drupal.translatePathFromContext(context)
345+ * }
346+ * ```
339347 */
340348 async translatePathFromContext (
341349 context : GetStaticPropsContext ,
You can’t perform that action at this time.
0 commit comments