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

Function navigateTo

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

Source from the content-addressed store, hash-verified

31}
32
33function navigateTo(chapterId: string, lessonId: string) {
34 const found = findLesson(chapterId, lessonId);
35 if (!found) return;
36
37 currentChapter.value = found.chapter;
38 currentLesson.value = found.lesson;
39 window.history.pushState(null, "", `/${chapterId}/${lessonId}`);
40}
41
42function getAdjacentLesson(direction: -1 | 1): Route | null {
43 if (!currentChapter.value || !currentLesson.value) return null;

Callers 1

initFunction · 0.85

Calls 1

findLessonFunction · 0.85

Tested by

no test coverage detected