fixed page key

This commit is contained in:
2024-09-02 11:21:07 -06:00
parent 1b03061fdd
commit 130035cc48
15 changed files with 446 additions and 336 deletions

View File

@@ -1,4 +1,8 @@
import { dehydrate, HydrationBoundary, QueryClient } from "@tanstack/react-query";
import {
dehydrate,
HydrationBoundary,
QueryClient,
} from "@tanstack/react-query";
import { hydrateCourse } from "@/hooks/hookHydration";
import { getQueryClient } from "@/app/providersQueryClientUtils";
@@ -9,6 +13,10 @@ export default async function CourseLayout({
children: React.ReactNode;
params: { courseName: string };
}) {
if (courseName.includes(".js.map")) {
console.log("cannot load course that is .js.map " + courseName);
return <div></div>;
}
const queryClient = getQueryClient();
await hydrateCourse(queryClient, courseName);