Skip to content

DeepTutor: Lifelong Personalized Tutoring. https://deeptutor.info/.

653 B
Raw Blame
"use client";

import { useParams, useSearchParams } from "next/navigation";

import { MasteryStudy } from "@/components/space/learning/MasteryStudy";
import { normalizeMasteryMode } from "@/lib/mastery-mode";

export default function MasteryStudyPage() {
  const params = useParams<{ pathId: string }>();
  const search = useSearchParams();
  // Only consulted when this route opens a *new* conversation; an existing
  // one carries the kind it was opened with.
  const requestedMode = normalizeMasteryMode(search.get("mode"));

  return (
    <MasteryStudy
      pathId={String(params.pathId || "")}
      requestedMode={requestedMode}
    />
  );
}