ENGLISH·COURSE API
    Preparing search index...
    • Turns a stored continue-watching location into the panel that describes it, or null when there is nothing honest to render.

      Parameters

      • location: {
            courseSlug: string & $brand<"Slug">;
            moduleSlug: string & $brand<"Slug">;
            lessonId: string & $brand<"LessonId">;
        }

        The identity the browser read from localStorage

      Returns Promise<ContinueWatchingPanel | null>

      The resolved panel, or null for a stale record or any failure

      next-safe-action answers with data, validationErrors or serverError, and every caller's response to all three failures is the same: render the state that claims nothing. Collapsing them here keeps that envelope out of the components and lets a test inject a plain function in its place.

      It lives beside the action rather than in src/lib because it is that action's client-side counterpart, not a general-purpose utility.