mirror of
https://github.com/alexmickelson/canvasManagement.git
synced 2026-03-26 07:38:33 -06:00
linting more trpc
This commit is contained in:
@@ -2,18 +2,14 @@ import type { Metadata } from "next";
|
||||
import "./globals.css";
|
||||
import Providers from "./providers";
|
||||
import { Suspense } from "react";
|
||||
import { getQueryClient } from "./providersQueryClientUtils";
|
||||
import { hydrateCourses } from "@/hooks/hookHydration";
|
||||
import { dehydrate, hydrate, HydrationBoundary } from "@tanstack/react-query";
|
||||
import { dehydrate, HydrationBoundary } from "@tanstack/react-query";
|
||||
import { MyToaster } from "./MyToaster";
|
||||
import { cookies } from "next/headers";
|
||||
import { createServerSideHelpers } from "@trpc/react-query/server";
|
||||
import { trpcAppRouter } from "@/services/trpc/router/app";
|
||||
import { createTrpcContext } from "@/services/trpc/context";
|
||||
import superjson from "superjson";
|
||||
import { fileStorageService } from "@/services/fileStorage/fileStorageService";
|
||||
import ClientOnly from "@/components/ClientOnly";
|
||||
import { createTRPCQueryUtils } from "@trpc/react-query";
|
||||
export const dynamic = "force-dynamic";
|
||||
|
||||
export const metadata: Metadata = {
|
||||
@@ -60,35 +56,35 @@ async function DataHydration({
|
||||
},
|
||||
},
|
||||
});
|
||||
const allSettings = await fileStorageService.settings.getAllCoursesSettings();
|
||||
await Promise.all(
|
||||
allSettings.map(async (settings) => {
|
||||
const courseName = settings.name;
|
||||
const moduleNames = await fileStorageService.modules.getModuleNames(
|
||||
courseName
|
||||
);
|
||||
await Promise.all(
|
||||
moduleNames.map(
|
||||
async (moduleName) =>
|
||||
await trpcHelper.assignment.getAllAssignments.fetch({
|
||||
courseName,
|
||||
moduleName,
|
||||
})
|
||||
)
|
||||
);
|
||||
})
|
||||
);
|
||||
// const allSettings = await fileStorageService.settings.getAllCoursesSettings();
|
||||
// await Promise.all(
|
||||
// allSettings.map(async (settings) => {
|
||||
// const courseName = settings.name;
|
||||
// const moduleNames = await fileStorageService.modules.getModuleNames(
|
||||
// courseName
|
||||
// );
|
||||
// await Promise.all(
|
||||
// moduleNames.map(
|
||||
// async (moduleName) =>
|
||||
// await trpcHelper.assignment.getAllAssignments.fetch({
|
||||
// courseName,
|
||||
// moduleName,
|
||||
// })
|
||||
// )
|
||||
// );
|
||||
// })
|
||||
// );
|
||||
|
||||
await Promise.all(
|
||||
allSettings.map(
|
||||
async (settings) =>
|
||||
await trpcHelper.lectures.getLectures.fetch({
|
||||
courseName: settings.name,
|
||||
})
|
||||
)
|
||||
);
|
||||
// await Promise.all(
|
||||
// allSettings.map(
|
||||
// async (settings) =>
|
||||
// await trpcHelper.lectures.getLectures.fetch({
|
||||
// courseName: settings.name,
|
||||
// })
|
||||
// )
|
||||
// );
|
||||
|
||||
await hydrateCourses(trpcHelper.queryClient);
|
||||
// await hydrateCourses(trpcHelper.queryClient);
|
||||
|
||||
const dehydratedState = dehydrate(trpcHelper.queryClient);
|
||||
console.log("ran hydration");
|
||||
|
||||
Reference in New Issue
Block a user