MCPcopy Create free account
hub / github.com/EmNudge/watlings / findLesson

Function findLesson

web-build/src/composables/useLessons.ts:24–31  ·  view source on GitHub ↗
(
  chapterId: string,
  lessonId: string,
)

Source from the content-addressed store, hash-verified

22);
23
24function findLesson(
25 chapterId: string,
26 lessonId: string,
27): { chapter: Chapter; lesson: Lesson } | null {
28 const chapter = data.value?.chapters.find((c) => c.id === chapterId);
29 const lesson = chapter?.lessons.find((l) => l.id === lessonId);
30 return chapter && lesson ? { chapter, lesson } : null;
31}
32
33function navigateTo(chapterId: string, lessonId: string) {
34 const found = findLesson(chapterId, lessonId);

Callers 2

navigateToFunction · 0.85
initFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected