diff --git a/apps/nextjs/.storybook/decorators/LessonPlanTrackingDecorator.tsx b/apps/nextjs/.storybook/decorators/LessonPlanTrackingDecorator.tsx
index ee83076cf..51adde0aa 100644
--- a/apps/nextjs/.storybook/decorators/LessonPlanTrackingDecorator.tsx
+++ b/apps/nextjs/.storybook/decorators/LessonPlanTrackingDecorator.tsx
@@ -2,10 +2,10 @@ import React from "react";
import type { Decorator } from "@storybook/react";
-import { lessonPlanTrackingContext } from "../../src/lib/analytics/lessonPlanTrackingContext";
+import { LessonPlanTrackingContext } from "../../src/lib/analytics/lessonPlanTrackingContext";
export const LessonPlanTrackingDecorator: Decorator = (Story) => (
- {},
onClickRetry: () => {},
@@ -16,5 +16,5 @@ export const LessonPlanTrackingDecorator: Decorator = (Story) => (
}}
>
-
+
);
diff --git a/apps/nextjs/src/lib/analytics/lessonPlanTrackingContext.tsx b/apps/nextjs/src/lib/analytics/lessonPlanTrackingContext.tsx
index d664640d4..e18c92d52 100644
--- a/apps/nextjs/src/lib/analytics/lessonPlanTrackingContext.tsx
+++ b/apps/nextjs/src/lib/analytics/lessonPlanTrackingContext.tsx
@@ -21,7 +21,7 @@ type OnStreamFinishedProps = {
nextLesson: LooseLessonPlan;
messages: Message[];
};
-type LessonPlanTrackingContext = {
+type LessonPlanTrackingContextProps = {
onStreamFinished: (props: OnStreamFinishedProps) => void;
onSubmitText: (text: string) => void;
onClickContinue: () => void;
@@ -30,8 +30,8 @@ type LessonPlanTrackingContext = {
onClickStartFromFreeText: (text: string) => void;
};
-export const lessonPlanTrackingContext =
- createContext(null);
+export const LessonPlanTrackingContext =
+ createContext(null);
export type LessonPlanTrackingProviderProps = Readonly<{
readonly children?: React.ReactNode;
@@ -91,7 +91,7 @@ const LessonPlanTrackingProvider: FC = ({
setUserMessageContent(text);
}, []);
- const value: LessonPlanTrackingContext = useMemo(
+ const value: LessonPlanTrackingContextProps = useMemo(
() => ({
onStreamFinished,
onSubmitText,
@@ -111,14 +111,14 @@ const LessonPlanTrackingProvider: FC = ({
);
return (
-
+
{children}
-
+
);
};
export const useLessonPlanTracking = () => {
- const context = useContext(lessonPlanTrackingContext);
+ const context = useContext(LessonPlanTrackingContext);
if (!context) {
throw new Error(
"useLessonPlanTracking must be used within a LessonPlanTrackingProvider",