ENGLISH·COURSE API
    Preparing search index...
    • Builds an onboarding href that carries the course route to return to.

      Parameters

      • path: string

        The locale-less onboarding path to navigate to

      • returnPath: string | undefined

        The course route to come back to, if any

      Returns string

      The href to hand to the locale-aware router

      The return path is appended as an encoded next query parameter only when isCourseReturnPath accepts it; otherwise the href is the bare path, so an invalid value silently falls back to the onboarding's usual flow.

      withReturnPath("/start", "/courses/basics"); // "/start?next=%2Fcourses%2Fbasics"
      withReturnPath("/start", undefined); // "/start"