Fix all Server Actions imported from dynamic route paths
All admin and student Client Components were importing Server Actions from paths with dynamic segments ([courseId], [moduleId], [lessonId], [slug]). This caused "Cannot access toStringTag on the server" RSC crash. Consolidated all Server Actions into static files under src/lib/actions/: - course-actions.ts (modules + enrollment) - module-actions.ts (lessons + reorder + move) - user-actions.ts (bulk grant / revoke) - student-actions.ts (progress + homework + comments) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
"use client";
|
||||
|
||||
import { useState, useTransition } from "react";
|
||||
import { submitHomework } from "@/app/(student)/courses/[slug]/lessons/[lessonId]/homework-actions";
|
||||
import { submitHomework } from "@/lib/actions/student-actions";
|
||||
import { AudioRecorder } from "@/components/curator/audio-recorder";
|
||||
|
||||
interface HWFile { name: string; url: string; size: number }
|
||||
|
||||
Reference in New Issue
Block a user