Move Server Actions to static paths to fix RSC temporary client reference error
Server Actions imported from dynamic route paths ([courseId]/[moduleId]/[lessonId]) caused "Cannot access toStringTag on the server" crash after saving a lesson. Moved saveLesson, saveHomework, deleteHomework to src/lib/actions/*.ts. 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 { saveHomework, deleteHomework } from "@/app/admin/courses/[courseId]/modules/[moduleId]/lessons/[lessonId]/homework-actions";
|
||||
import { saveHomework, deleteHomework } from "@/lib/actions/homework-actions";
|
||||
|
||||
interface Props {
|
||||
lessonId: string;
|
||||
|
||||
Reference in New Issue
Block a user